@declarion/react 0.32.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{ActionRunner-CaSrGpBi.js → ActionRunner-UGGvGypS.js} +676 -543
- package/dist-lib/{DraggableChildrenTable-CAHg7paQ.js → DraggableChildrenTable-CljdYXd_.js} +30 -30
- package/dist-lib/DynamicIcon-BWO6QtNF.js +261 -0
- package/dist-lib/{Grid-DDbBhqcl.js → Grid-5Y_iPqNW.js} +2 -2
- package/dist-lib/{LayoutRenderer-CelsqsZ6.js → LayoutRenderer-CoTMmvNW.js} +712 -712
- package/dist-lib/{MarkdownRenderer-DThy2ixe.js → MarkdownRenderer-unbncYEV.js} +1 -1
- package/dist-lib/RefreshControl-oeKhCjEC.js +837 -0
- package/dist-lib/SmartDetailPage.impl-Caxd97q6.js +1771 -0
- package/dist-lib/{SmartRecordListPage.impl-BKIpTNK7.js → SmartRecordListPage.impl-BF_ieDc2.js} +258 -258
- package/dist-lib/components/pages/DocumentsMenu.d.ts +22 -0
- package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +42 -0
- package/dist-lib/components/pages/list/ListHeader.d.ts +1 -11
- package/dist-lib/components/primitives/Icons.d.ts +1 -0
- package/dist-lib/components/primitives/Tooltip.d.ts +30 -0
- package/dist-lib/components/primitives/index.d.ts +2 -0
- package/dist-lib/components/shared/ActionResultDialog.d.ts +4 -0
- package/dist-lib/components/shared/RecordHeader.d.ts +2 -1
- package/dist-lib/components/shared/ResponsiveActionBar.d.ts +9 -1
- package/dist-lib/icons.js +1 -1
- package/dist-lib/index.js +2288 -2334
- package/dist-lib/lib/document-templates.d.ts +12 -0
- package/dist-lib/lib/download.d.ts +20 -0
- package/dist-lib/lib/record-documents-key.d.ts +1 -0
- package/dist-lib/{registry-KQyyL5Gt.js → registry-DnPK3Msj.js} +826 -826
- package/dist-lib/testing.js +25 -25
- package/dist-lib/types/api.d.ts +1 -9
- package/dist-lib/types/schema.d.ts +17 -1
- package/dist-lib/{useProperties-D74hyWIa.js → useProperties-CgRhBh0k.js} +52 -52
- package/dist-lib/{value-BfXXl5EE.js → value-GmL5BVFm.js} +29 -29
- package/package.json +1 -1
- package/dist-lib/DynamicIcon-DCRdxxZ7.js +0 -260
- package/dist-lib/RefreshControl-CorluL6r.js +0 -582
- package/dist-lib/SmartDetailPage.impl-USIxbl-8.js +0 -1532
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as e, t } from "./DynamicIcon-
|
|
1
|
+
import { s as e, t } from "./DynamicIcon-BWO6QtNF.js";
|
|
2
2
|
import { Suspense as n, createContext as r, forwardRef as i, lazy as a, useCallback as o, useContext as s, useEffect as c, useLayoutEffect as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
3
3
|
import { useLocation as p, useNavigate as m } from "react-router-dom";
|
|
4
4
|
import { useQuery as h } from "@tanstack/react-query";
|
|
@@ -1231,13 +1231,9 @@ function Re(e, t) {
|
|
|
1231
1231
|
if (i != null) return typeof i == "object" && !Array.isArray(i) ? I(i) || void 0 : F(i);
|
|
1232
1232
|
}
|
|
1233
1233
|
function L(e, t, n) {
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
let r = e[t];
|
|
1238
|
-
if (r != null) return typeof r == "object" && !Array.isArray(r) ? I(r) || n : F(r);
|
|
1239
|
-
}
|
|
1240
|
-
return n;
|
|
1234
|
+
if (!t) return n;
|
|
1235
|
+
let r = e[t];
|
|
1236
|
+
return r == null ? n : typeof r == "object" && !Array.isArray(r) ? I(r) || n : F(r);
|
|
1241
1237
|
}
|
|
1242
1238
|
function ze(e) {
|
|
1243
1239
|
let t = e.replace(/\/+$/, "").split("/").map((e) => e.startsWith(":") ? "[^/]+" : e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
@@ -2880,7 +2876,7 @@ var Z = {
|
|
|
2880
2876
|
update: oi,
|
|
2881
2877
|
dismiss: (e) => g.dismiss(e),
|
|
2882
2878
|
dismissAll: () => g.dismiss()
|
|
2883
|
-
}, si = a(() => import("./MarkdownRenderer-
|
|
2879
|
+
}, si = a(() => import("./MarkdownRenderer-unbncYEV.js").then((e) => ({ default: e.MarkdownRenderer })));
|
|
2884
2880
|
function ci() {
|
|
2885
2881
|
return /* @__PURE__ */ v("div", { className: "h-4 w-2/3 rounded bg-muted animate-pulse" });
|
|
2886
2882
|
}
|
|
@@ -2891,11 +2887,69 @@ function li(e) {
|
|
|
2891
2887
|
});
|
|
2892
2888
|
}
|
|
2893
2889
|
//#endregion
|
|
2890
|
+
//#region src/lib/safe-url.ts
|
|
2891
|
+
var ui = [
|
|
2892
|
+
"http:",
|
|
2893
|
+
"https:",
|
|
2894
|
+
"mailto:"
|
|
2895
|
+
], di = /[\u0000-\u001f\u007f]/g;
|
|
2896
|
+
function fi(e) {
|
|
2897
|
+
if (!e) return;
|
|
2898
|
+
let t = e.trim();
|
|
2899
|
+
if (!t) return;
|
|
2900
|
+
let n = t.replace(di, "");
|
|
2901
|
+
if (!n || n.startsWith("//")) return;
|
|
2902
|
+
let r = n.match(/^([a-zA-Z][a-zA-Z0-9+.-]*):/);
|
|
2903
|
+
if (r) {
|
|
2904
|
+
let e = r[1].toLowerCase() + ":";
|
|
2905
|
+
if (!ui.includes(e)) return;
|
|
2906
|
+
}
|
|
2907
|
+
return n;
|
|
2908
|
+
}
|
|
2909
|
+
//#endregion
|
|
2910
|
+
//#region src/lib/download.ts
|
|
2911
|
+
var pi = class extends Error {
|
|
2912
|
+
code;
|
|
2913
|
+
constructor(e, t) {
|
|
2914
|
+
super(e), this.code = t, this.name = "DownloadError";
|
|
2915
|
+
}
|
|
2916
|
+
};
|
|
2917
|
+
function mi(e) {
|
|
2918
|
+
return e instanceof pi && e.code === "FILE_NOT_FOUND";
|
|
2919
|
+
}
|
|
2920
|
+
async function hi(e, t) {
|
|
2921
|
+
let n = fi(e);
|
|
2922
|
+
if (!n) throw new pi(`Refused to download from an unsafe URL: ${e}`);
|
|
2923
|
+
let r = await fetch(n, { credentials: "same-origin" });
|
|
2924
|
+
if (!r.ok) {
|
|
2925
|
+
let e = await gi(r);
|
|
2926
|
+
throw new pi(e.message || `Download failed (${r.status})`, e.code);
|
|
2927
|
+
}
|
|
2928
|
+
let i = await r.blob(), a = URL.createObjectURL(i), o = document.createElement("a");
|
|
2929
|
+
o.href = a, t && (o.download = t), document.body.appendChild(o), o.click(), o.remove(), URL.revokeObjectURL(a);
|
|
2930
|
+
}
|
|
2931
|
+
async function gi(e) {
|
|
2932
|
+
let t = await e.text();
|
|
2933
|
+
if (!t) return {};
|
|
2934
|
+
try {
|
|
2935
|
+
let e = JSON.parse(t);
|
|
2936
|
+
return typeof e.error == "string" ? {
|
|
2937
|
+
message: e.error,
|
|
2938
|
+
code: e.code
|
|
2939
|
+
} : {
|
|
2940
|
+
code: e.error?.code ?? e.code,
|
|
2941
|
+
message: e.error?.message ?? e.message
|
|
2942
|
+
};
|
|
2943
|
+
} catch {
|
|
2944
|
+
return { message: t };
|
|
2945
|
+
}
|
|
2946
|
+
}
|
|
2947
|
+
//#endregion
|
|
2894
2948
|
//#region src/types/fieldType.ts
|
|
2895
|
-
var
|
|
2949
|
+
var _i = /* @__PURE__ */ "bool.bytes.date.decimal.email.enum.float.int.int_array.json.multilang.multilang_text.password.phone.ref.rich_text.secret.string.string_array.structure.tags.text.time.timestamp.url.uuid.uuid_array".split(".");
|
|
2896
2950
|
//#endregion
|
|
2897
2951
|
//#region src/components/shared/CopyButton.tsx
|
|
2898
|
-
function
|
|
2952
|
+
function vi({ value: t, title: n, size: r = "icon" }) {
|
|
2899
2953
|
let [i, a] = f(!1), s = o(async (e) => {
|
|
2900
2954
|
e.stopPropagation(), e.preventDefault();
|
|
2901
2955
|
try {
|
|
@@ -2914,7 +2968,7 @@ function di({ value: t, title: n, size: r = "icon" }) {
|
|
|
2914
2968
|
}
|
|
2915
2969
|
//#endregion
|
|
2916
2970
|
//#region src/components/fields/StringField.tsx
|
|
2917
|
-
function
|
|
2971
|
+
function yi({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a }) {
|
|
2918
2972
|
if (r === "display") {
|
|
2919
2973
|
let t = F(n);
|
|
2920
2974
|
return e.copyable && t ? /* @__PURE__ */ y("span", {
|
|
@@ -2926,7 +2980,7 @@ function fi({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
2926
2980
|
children: [/* @__PURE__ */ v("span", {
|
|
2927
2981
|
style: { fontSize: 12.5 },
|
|
2928
2982
|
children: t
|
|
2929
|
-
}), /* @__PURE__ */ v(
|
|
2983
|
+
}), /* @__PURE__ */ v(vi, {
|
|
2930
2984
|
value: t,
|
|
2931
2985
|
size: "sm"
|
|
2932
2986
|
})]
|
|
@@ -2948,7 +3002,7 @@ function fi({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
2948
3002
|
}
|
|
2949
3003
|
//#endregion
|
|
2950
3004
|
//#region src/components/fields/TextField.tsx
|
|
2951
|
-
function
|
|
3005
|
+
function bi({ field: e, fieldName: t, value: n, mode: r, onChange: i, fill: a, compact: o, fieldId: s }) {
|
|
2952
3006
|
let c = e.display?.widget;
|
|
2953
3007
|
if (r === "display") {
|
|
2954
3008
|
let t = F(n);
|
|
@@ -2991,7 +3045,7 @@ function pi({ field: e, fieldName: t, value: n, mode: r, onChange: i, fill: a, c
|
|
|
2991
3045
|
top: 0,
|
|
2992
3046
|
right: 0
|
|
2993
3047
|
},
|
|
2994
|
-
children: /* @__PURE__ */ v(
|
|
3048
|
+
children: /* @__PURE__ */ v(vi, {
|
|
2995
3049
|
value: t,
|
|
2996
3050
|
size: "sm"
|
|
2997
3051
|
})
|
|
@@ -3018,8 +3072,8 @@ function pi({ field: e, fieldName: t, value: n, mode: r, onChange: i, fill: a, c
|
|
|
3018
3072
|
}
|
|
3019
3073
|
//#endregion
|
|
3020
3074
|
//#region src/components/fields/EnumField.tsx
|
|
3021
|
-
var
|
|
3022
|
-
function
|
|
3075
|
+
var xi = "__declarion_enum_null__";
|
|
3076
|
+
function Si({ field: e, value: t, mode: n, onChange: r, fieldId: i, labelId: a }) {
|
|
3023
3077
|
let o = e.values ?? [], s = o.find((e) => e.code === t);
|
|
3024
3078
|
if (n === "display") return s ? /* @__PURE__ */ v(D, {
|
|
3025
3079
|
tone: s.color ?? "slate",
|
|
@@ -3032,8 +3086,8 @@ function hi({ field: e, value: t, mode: n, onChange: r, fieldId: i, labelId: a }
|
|
|
3032
3086
|
},
|
|
3033
3087
|
children: "—"
|
|
3034
3088
|
});
|
|
3035
|
-
let c = !e.required, l = t != null && t !== "" ? F(t) :
|
|
3036
|
-
value:
|
|
3089
|
+
let c = !e.required, l = t != null && t !== "" ? F(t) : xi, u = [...c ? [{
|
|
3090
|
+
value: xi,
|
|
3037
3091
|
label: "— None —"
|
|
3038
3092
|
}] : [], ...o.map((e) => ({
|
|
3039
3093
|
value: e.code,
|
|
@@ -3045,13 +3099,13 @@ function hi({ field: e, value: t, mode: n, onChange: r, fieldId: i, labelId: a }
|
|
|
3045
3099
|
"aria-required": e.required || void 0,
|
|
3046
3100
|
value: l,
|
|
3047
3101
|
options: u,
|
|
3048
|
-
onChange: (e) => r?.(e ===
|
|
3102
|
+
onChange: (e) => r?.(e === xi ? null : e),
|
|
3049
3103
|
placeholder: "Select…"
|
|
3050
3104
|
});
|
|
3051
3105
|
}
|
|
3052
3106
|
//#endregion
|
|
3053
3107
|
//#region src/components/fields/EmailField.tsx
|
|
3054
|
-
function
|
|
3108
|
+
function Ci({ field: e, fieldName: t, value: n, onChange: r, fieldId: i }) {
|
|
3055
3109
|
return /* @__PURE__ */ v(N, {
|
|
3056
3110
|
id: i,
|
|
3057
3111
|
name: t,
|
|
@@ -3063,7 +3117,7 @@ function gi({ field: e, fieldName: t, value: n, onChange: r, fieldId: i }) {
|
|
|
3063
3117
|
}
|
|
3064
3118
|
//#endregion
|
|
3065
3119
|
//#region src/components/fields/UrlField.tsx
|
|
3066
|
-
function
|
|
3120
|
+
function wi({ field: e, fieldName: t, value: n, onChange: r, fieldId: i }) {
|
|
3067
3121
|
return /* @__PURE__ */ v(N, {
|
|
3068
3122
|
id: i,
|
|
3069
3123
|
name: t,
|
|
@@ -3076,7 +3130,7 @@ function _i({ field: e, fieldName: t, value: n, onChange: r, fieldId: i }) {
|
|
|
3076
3130
|
}
|
|
3077
3131
|
//#endregion
|
|
3078
3132
|
//#region src/components/fields/PhoneField.tsx
|
|
3079
|
-
function
|
|
3133
|
+
function Ti({ field: e, fieldName: t, value: n, onChange: r, fieldId: i }) {
|
|
3080
3134
|
return /* @__PURE__ */ v(N, {
|
|
3081
3135
|
id: i,
|
|
3082
3136
|
name: t,
|
|
@@ -3089,10 +3143,10 @@ function vi({ field: e, fieldName: t, value: n, onChange: r, fieldId: i }) {
|
|
|
3089
3143
|
}
|
|
3090
3144
|
//#endregion
|
|
3091
3145
|
//#region src/lib/timestamp.ts
|
|
3092
|
-
function
|
|
3146
|
+
function Ei(e = /* @__PURE__ */ new Date()) {
|
|
3093
3147
|
return w(e);
|
|
3094
3148
|
}
|
|
3095
|
-
function
|
|
3149
|
+
function Di(e, t) {
|
|
3096
3150
|
let n = e.match(/([+-]\d{2}:\d{2})$/), r = e.endsWith("Z"), i = new Date(e);
|
|
3097
3151
|
if (isNaN(i.getTime())) return e;
|
|
3098
3152
|
if (n || r) {
|
|
@@ -3118,13 +3172,13 @@ function bi(e, t) {
|
|
|
3118
3172
|
}
|
|
3119
3173
|
return new Intl.DateTimeFormat(void 0, t).format(i);
|
|
3120
3174
|
}
|
|
3121
|
-
function
|
|
3122
|
-
return
|
|
3175
|
+
function Oi(e) {
|
|
3176
|
+
return Di(e, {
|
|
3123
3177
|
dateStyle: "medium",
|
|
3124
3178
|
timeStyle: "short"
|
|
3125
3179
|
});
|
|
3126
3180
|
}
|
|
3127
|
-
function
|
|
3181
|
+
function ki(e, t = /* @__PURE__ */ new Date()) {
|
|
3128
3182
|
if (e == null || e === "") return {
|
|
3129
3183
|
text: "—",
|
|
3130
3184
|
absolute: ""
|
|
@@ -3137,7 +3191,7 @@ function Si(e, t = /* @__PURE__ */ new Date()) {
|
|
|
3137
3191
|
absolute: t
|
|
3138
3192
|
};
|
|
3139
3193
|
}
|
|
3140
|
-
let r =
|
|
3194
|
+
let r = Oi(typeof e == "string" ? e : n.toISOString()), i = t.getTime() - n.getTime();
|
|
3141
3195
|
return Math.abs(i) > 720 * 60 * 60 * 1e3 ? {
|
|
3142
3196
|
text: w(n, { representation: "date" }),
|
|
3143
3197
|
absolute: r
|
|
@@ -3148,23 +3202,23 @@ function Si(e, t = /* @__PURE__ */ new Date()) {
|
|
|
3148
3202
|
}
|
|
3149
3203
|
//#endregion
|
|
3150
3204
|
//#region src/components/fields/TimestampField.tsx
|
|
3151
|
-
var
|
|
3205
|
+
var Ai = {
|
|
3152
3206
|
year: "numeric",
|
|
3153
3207
|
month: "short",
|
|
3154
3208
|
day: "numeric"
|
|
3155
|
-
},
|
|
3156
|
-
...
|
|
3209
|
+
}, ji = {
|
|
3210
|
+
...Ai,
|
|
3157
3211
|
hour: "2-digit",
|
|
3158
3212
|
minute: "2-digit"
|
|
3159
3213
|
};
|
|
3160
|
-
function
|
|
3214
|
+
function Mi(e, t) {
|
|
3161
3215
|
if (t) {
|
|
3162
3216
|
let t = /* @__PURE__ */ new Date(e + "T00:00:00");
|
|
3163
|
-
return isNaN(t.getTime()) ? e : new Intl.DateTimeFormat(void 0,
|
|
3217
|
+
return isNaN(t.getTime()) ? e : new Intl.DateTimeFormat(void 0, Ai).format(t);
|
|
3164
3218
|
}
|
|
3165
|
-
return
|
|
3219
|
+
return Di(e, ji);
|
|
3166
3220
|
}
|
|
3167
|
-
function
|
|
3221
|
+
function Ni(e, t) {
|
|
3168
3222
|
if (t) {
|
|
3169
3223
|
let t = /* @__PURE__ */ new Date(e + "T00:00:00");
|
|
3170
3224
|
return isNaN(t.getTime()) ? e : new Intl.DateTimeFormat(void 0, {
|
|
@@ -3182,14 +3236,14 @@ function Ei(e, t) {
|
|
|
3182
3236
|
minute: "2-digit"
|
|
3183
3237
|
}).format(n);
|
|
3184
3238
|
}
|
|
3185
|
-
function
|
|
3239
|
+
function Pi(e) {
|
|
3186
3240
|
if (e.endsWith("Z")) return "UTC";
|
|
3187
3241
|
let t = e.match(/([+-]\d{2}:\d{2})$/);
|
|
3188
3242
|
if (!t) return null;
|
|
3189
3243
|
let n = t[1].charAt(0), r = parseInt(t[1].substring(1, 3), 10), i = parseInt(t[1].substring(4, 6), 10);
|
|
3190
3244
|
return r === 0 && i === 0 ? "UTC" : `UTC${n}${r}${i > 0 ? `:${String(i).padStart(2, "0")}` : ""}`;
|
|
3191
3245
|
}
|
|
3192
|
-
function
|
|
3246
|
+
function Fi(e, t) {
|
|
3193
3247
|
let n = e.match(/([+-]\d{2}:\d{2})$/), r = e.endsWith("Z"), i = new Date(e);
|
|
3194
3248
|
if (isNaN(i.getTime())) return "";
|
|
3195
3249
|
if (r) {
|
|
@@ -3202,13 +3256,13 @@ function Oi(e, t) {
|
|
|
3202
3256
|
}
|
|
3203
3257
|
return t ? e.slice(0, 10) : e.slice(0, 16);
|
|
3204
3258
|
}
|
|
3205
|
-
function
|
|
3259
|
+
function Ii(e, t) {
|
|
3206
3260
|
let n = new Date(e);
|
|
3207
3261
|
if (isNaN(n.getTime())) return "";
|
|
3208
3262
|
let r = n.getFullYear(), i = String(n.getMonth() + 1).padStart(2, "0"), a = String(n.getDate()).padStart(2, "0");
|
|
3209
3263
|
return t ? `${r}-${i}-${a}` : `${r}-${i}-${a}T${String(n.getHours()).padStart(2, "0")}:${String(n.getMinutes()).padStart(2, "0")}`;
|
|
3210
3264
|
}
|
|
3211
|
-
function
|
|
3265
|
+
function Li({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a }) {
|
|
3212
3266
|
let o = e.type === "date", s = !!e.timezone;
|
|
3213
3267
|
if (r === "display") {
|
|
3214
3268
|
if (!n) return /* @__PURE__ */ v("span", {
|
|
@@ -3218,7 +3272,7 @@ function Ai({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
3218
3272
|
},
|
|
3219
3273
|
children: "—"
|
|
3220
3274
|
});
|
|
3221
|
-
let e = F(n), t = s ?
|
|
3275
|
+
let e = F(n), t = s ? Mi(e, o) : Ni(e, o), r = s && !o ? Pi(e) : null;
|
|
3222
3276
|
return /* @__PURE__ */ y("span", {
|
|
3223
3277
|
style: { fontSize: 12.5 },
|
|
3224
3278
|
children: [t, r && /* @__PURE__ */ v("span", {
|
|
@@ -3230,7 +3284,7 @@ function Ai({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
3230
3284
|
})]
|
|
3231
3285
|
});
|
|
3232
3286
|
}
|
|
3233
|
-
let c = n ? s ?
|
|
3287
|
+
let c = n ? s ? Fi(F(n), o) : Ii(F(n), o) : "";
|
|
3234
3288
|
return /* @__PURE__ */ v(N, {
|
|
3235
3289
|
id: a,
|
|
3236
3290
|
name: t,
|
|
@@ -3251,13 +3305,13 @@ function Ai({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
3251
3305
|
i?.(e);
|
|
3252
3306
|
return;
|
|
3253
3307
|
}
|
|
3254
|
-
i?.(
|
|
3308
|
+
i?.(Ei(t));
|
|
3255
3309
|
}
|
|
3256
3310
|
});
|
|
3257
3311
|
}
|
|
3258
3312
|
//#endregion
|
|
3259
3313
|
//#region src/components/fields/BoolField.tsx
|
|
3260
|
-
function
|
|
3314
|
+
function Ri({ value: e, mode: t, onChange: n, fieldId: r, labelId: i }) {
|
|
3261
3315
|
let a = !!e;
|
|
3262
3316
|
return t === "display" ? /* @__PURE__ */ y("span", {
|
|
3263
3317
|
style: {
|
|
@@ -3282,7 +3336,7 @@ function ji({ value: e, mode: t, onChange: n, fieldId: r, labelId: i }) {
|
|
|
3282
3336
|
}
|
|
3283
3337
|
//#endregion
|
|
3284
3338
|
//#region src/components/fields/NumberField.tsx
|
|
3285
|
-
function
|
|
3339
|
+
function zi(e) {
|
|
3286
3340
|
let t = e.trim();
|
|
3287
3341
|
if (t === "" || t === "-") return t;
|
|
3288
3342
|
let n = t.startsWith("-"), [r, i] = (n ? t.slice(1) : t).split("."), a;
|
|
@@ -3294,8 +3348,8 @@ function Mi(e) {
|
|
|
3294
3348
|
let o = n ? `-${a}` : a;
|
|
3295
3349
|
return i !== void 0 && (o += `.${i}`), o;
|
|
3296
3350
|
}
|
|
3297
|
-
var
|
|
3298
|
-
function
|
|
3351
|
+
var Bi = new Intl.NumberFormat();
|
|
3352
|
+
function Vi({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a, fieldId: o }) {
|
|
3299
3353
|
let s = e.display?.widget === "money", c = e.type === "decimal" || s, l = a?.$units?.[t], u = !l && e.unit ? e.unit.display || e.unit.storage : void 0, d = l || (u && !u.startsWith("$") ? u : void 0);
|
|
3300
3354
|
if (r === "display") {
|
|
3301
3355
|
if (n == null) return /* @__PURE__ */ v("span", {
|
|
@@ -3306,10 +3360,10 @@ function Pi({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a,
|
|
|
3306
3360
|
children: "—"
|
|
3307
3361
|
});
|
|
3308
3362
|
let e;
|
|
3309
|
-
if (c && typeof n == "string") e =
|
|
3363
|
+
if (c && typeof n == "string") e = zi(n);
|
|
3310
3364
|
else {
|
|
3311
3365
|
let t = Number(n);
|
|
3312
|
-
e = isNaN(t) ? null :
|
|
3366
|
+
e = isNaN(t) ? null : Bi.format(t);
|
|
3313
3367
|
}
|
|
3314
3368
|
return e == null ? /* @__PURE__ */ v("span", {
|
|
3315
3369
|
style: { fontSize: 12.5 },
|
|
@@ -3353,14 +3407,8 @@ function Pi({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a,
|
|
|
3353
3407
|
});
|
|
3354
3408
|
}
|
|
3355
3409
|
//#endregion
|
|
3356
|
-
//#region src/hooks/useEntity.ts
|
|
3357
|
-
function Fi(e) {
|
|
3358
|
-
let { data: t } = J();
|
|
3359
|
-
if (!(!t || !e)) return t.entities[e];
|
|
3360
|
-
}
|
|
3361
|
-
//#endregion
|
|
3362
3410
|
//#region src/hooks/useEntityData.ts
|
|
3363
|
-
function
|
|
3411
|
+
function Hi(e, t) {
|
|
3364
3412
|
return [
|
|
3365
3413
|
"entity-data",
|
|
3366
3414
|
e,
|
|
@@ -3370,8 +3418,8 @@ function Ii(e, t) {
|
|
|
3370
3418
|
}
|
|
3371
3419
|
];
|
|
3372
3420
|
}
|
|
3373
|
-
function
|
|
3374
|
-
let r =
|
|
3421
|
+
function Ui(e, t, n = !0) {
|
|
3422
|
+
let r = Hi(e, t), i = r[2];
|
|
3375
3423
|
return h({
|
|
3376
3424
|
queryKey: r,
|
|
3377
3425
|
queryFn: ({ signal: t }) => Vn(e, i, { signal: t }),
|
|
@@ -3379,7 +3427,7 @@ function Li(e, t, n = !0) {
|
|
|
3379
3427
|
placeholderData: (t, n) => n?.queryKey?.[1] === e ? t : void 0
|
|
3380
3428
|
});
|
|
3381
3429
|
}
|
|
3382
|
-
function
|
|
3430
|
+
function Wi(e, t, n = !0) {
|
|
3383
3431
|
let r = {
|
|
3384
3432
|
...t,
|
|
3385
3433
|
count: "only",
|
|
@@ -3404,7 +3452,7 @@ function Ri(e, t, n = !0) {
|
|
|
3404
3452
|
}
|
|
3405
3453
|
//#endregion
|
|
3406
3454
|
//#region src/hooks/useDebounce.ts
|
|
3407
|
-
function
|
|
3455
|
+
function Gi(e, t) {
|
|
3408
3456
|
let [n, r] = f(e);
|
|
3409
3457
|
return c(() => {
|
|
3410
3458
|
let n = setTimeout(() => r(e), t);
|
|
@@ -3412,18 +3460,24 @@ function zi(e, t) {
|
|
|
3412
3460
|
}, [e, t]), n;
|
|
3413
3461
|
}
|
|
3414
3462
|
//#endregion
|
|
3463
|
+
//#region src/hooks/useEntity.ts
|
|
3464
|
+
function Ki(e) {
|
|
3465
|
+
let { data: t } = J();
|
|
3466
|
+
if (!(!t || !e)) return t.entities[e];
|
|
3467
|
+
}
|
|
3468
|
+
//#endregion
|
|
3415
3469
|
//#region src/components/fields/RefCombobox.tsx
|
|
3416
|
-
var
|
|
3417
|
-
function
|
|
3418
|
-
let m = e?.entity, h =
|
|
3419
|
-
per_page:
|
|
3470
|
+
var qi = 200;
|
|
3471
|
+
function Ji({ ref: e, value: t, onChange: n, refs: r, displayFieldOverride: i, id: a, labelId: o, ariaLabel: s, required: c, placeholder: l = "Select…", specialValues: p }) {
|
|
3472
|
+
let m = e?.entity, h = Ki(m), g = i ?? e?.display?.field ?? h?.display?.display_field ?? "$display", _ = u(() => h ? R(h)[0] ?? "id" : "id", [h]), y = e?.field || _, [b, x] = f(""), S = Gi(b, 300), { data: C, isLoading: w } = Ui(m, {
|
|
3473
|
+
per_page: qi,
|
|
3420
3474
|
sort: g ? `${g}:asc` : void 0,
|
|
3421
3475
|
search: S || void 0
|
|
3422
3476
|
}), T = u(() => C?.data ?? [], [C?.data]), E = t == null ? "" : F(t), D = u(() => T.some((e) => String(e[y]) === E), [
|
|
3423
3477
|
T,
|
|
3424
3478
|
y,
|
|
3425
3479
|
E
|
|
3426
|
-
]), O = r && m ? r[m]?.[E] : void 0, k = !!p?.some((e) => e.code === E), { data: A } =
|
|
3480
|
+
]), O = r && m ? r[m]?.[E] : void 0, k = !!p?.some((e) => e.code === E), { data: A } = Ui(E && !D && !k && !O && !w ? m : void 0, {
|
|
3427
3481
|
per_page: 1,
|
|
3428
3482
|
filters: [{
|
|
3429
3483
|
field: y,
|
|
@@ -3510,25 +3564,25 @@ function Vi({ ref: e, value: t, onChange: n, refs: r, displayFieldOverride: i, i
|
|
|
3510
3564
|
}
|
|
3511
3565
|
//#endregion
|
|
3512
3566
|
//#region src/components/fields/RefField.tsx
|
|
3513
|
-
function
|
|
3514
|
-
let s = e.ref?.entity, c =
|
|
3567
|
+
function Yi({ field: e, value: t, mode: n, onChange: r, refs: i, fieldId: a, labelId: o }) {
|
|
3568
|
+
let s = e.ref?.entity, c = e.display?.ref_display_field || "$display", l = u(() => {
|
|
3515
3569
|
if (t == null) return "—";
|
|
3516
3570
|
let e = F(t);
|
|
3517
3571
|
if (i && s) {
|
|
3518
3572
|
let t = i[s]?.[e];
|
|
3519
|
-
if (t) return L(t,
|
|
3573
|
+
if (t) return L(t, c, e);
|
|
3520
3574
|
}
|
|
3521
3575
|
return e;
|
|
3522
3576
|
}, [
|
|
3523
3577
|
t,
|
|
3524
3578
|
i,
|
|
3525
3579
|
s,
|
|
3526
|
-
|
|
3580
|
+
c
|
|
3527
3581
|
]);
|
|
3528
3582
|
return n === "display" ? /* @__PURE__ */ v("span", {
|
|
3529
3583
|
style: { fontSize: 12.5 },
|
|
3530
|
-
children:
|
|
3531
|
-
}) : /* @__PURE__ */ v(
|
|
3584
|
+
children: l
|
|
3585
|
+
}) : /* @__PURE__ */ v(Ji, {
|
|
3532
3586
|
ref: e.ref,
|
|
3533
3587
|
value: t,
|
|
3534
3588
|
onChange: (e) => r?.(e),
|
|
@@ -3541,29 +3595,29 @@ function Hi({ field: e, value: t, mode: n, onChange: r, refs: i, fieldId: a, lab
|
|
|
3541
3595
|
}
|
|
3542
3596
|
//#endregion
|
|
3543
3597
|
//#region src/components/fields/JsonField.tsx
|
|
3544
|
-
var
|
|
3545
|
-
function
|
|
3598
|
+
var Xi = a(() => import("./JsonEditor-KelPV-OQ.js").then((e) => ({ default: e.JsonEditor })));
|
|
3599
|
+
function Zi() {
|
|
3546
3600
|
return /* @__PURE__ */ v("div", { className: "h-20 rounded-md border border-border bg-muted animate-pulse" });
|
|
3547
3601
|
}
|
|
3548
|
-
function
|
|
3602
|
+
function Qi(e) {
|
|
3549
3603
|
return e == null ? !0 : typeof e == "string" ? e.trim() === "" : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1;
|
|
3550
3604
|
}
|
|
3551
|
-
function
|
|
3552
|
-
return t === "display" ?
|
|
3605
|
+
function $i({ value: e, mode: t, onChange: r, fieldId: i }) {
|
|
3606
|
+
return t === "display" ? Qi(e) ? /* @__PURE__ */ v("span", {
|
|
3553
3607
|
style: {
|
|
3554
3608
|
fontSize: 12.5,
|
|
3555
3609
|
color: "var(--text-4)"
|
|
3556
3610
|
},
|
|
3557
3611
|
children: "—"
|
|
3558
3612
|
}) : /* @__PURE__ */ v(n, {
|
|
3559
|
-
fallback: /* @__PURE__ */ v(
|
|
3560
|
-
children: /* @__PURE__ */ v(
|
|
3613
|
+
fallback: /* @__PURE__ */ v(Zi, {}),
|
|
3614
|
+
children: /* @__PURE__ */ v(Xi, {
|
|
3561
3615
|
value: e,
|
|
3562
3616
|
readOnly: !0
|
|
3563
3617
|
})
|
|
3564
3618
|
}) : /* @__PURE__ */ v(n, {
|
|
3565
|
-
fallback: /* @__PURE__ */ v(
|
|
3566
|
-
children: /* @__PURE__ */ v(
|
|
3619
|
+
fallback: /* @__PURE__ */ v(Zi, {}),
|
|
3620
|
+
children: /* @__PURE__ */ v(Xi, {
|
|
3567
3621
|
value: e,
|
|
3568
3622
|
onChange: r,
|
|
3569
3623
|
id: i
|
|
@@ -3572,14 +3626,14 @@ function Ki({ value: e, mode: t, onChange: r, fieldId: i }) {
|
|
|
3572
3626
|
}
|
|
3573
3627
|
//#endregion
|
|
3574
3628
|
//#region src/components/fields/MultilangField.tsx
|
|
3575
|
-
function
|
|
3629
|
+
function ea(e) {
|
|
3576
3630
|
return e == null ? {} : typeof e == "object" && !Array.isArray(e) ? e : typeof e == "string" ? { en: e } : {};
|
|
3577
3631
|
}
|
|
3578
|
-
function
|
|
3632
|
+
function ta({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a }) {
|
|
3579
3633
|
let { data: o } = J(), s = o?.languages?.length ? o.languages : [{
|
|
3580
3634
|
code: "en",
|
|
3581
3635
|
name: { en: "English" }
|
|
3582
|
-
}], c =
|
|
3636
|
+
}], c = ea(n);
|
|
3583
3637
|
if (r === "display") return /* @__PURE__ */ v("span", {
|
|
3584
3638
|
style: { fontSize: 12.5 },
|
|
3585
3639
|
children: Object.values(c)[0] ?? "—"
|
|
@@ -3635,14 +3689,14 @@ function Ji({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
3635
3689
|
}
|
|
3636
3690
|
//#endregion
|
|
3637
3691
|
//#region src/components/fields/MultilangTextField.tsx
|
|
3638
|
-
function
|
|
3692
|
+
function na(e) {
|
|
3639
3693
|
return e == null ? {} : typeof e == "object" && !Array.isArray(e) ? e : typeof e == "string" ? { en: e } : {};
|
|
3640
3694
|
}
|
|
3641
|
-
function
|
|
3695
|
+
function ra({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a }) {
|
|
3642
3696
|
let { data: o } = J(), s = o?.languages?.length ? o.languages : [{
|
|
3643
3697
|
code: "en",
|
|
3644
3698
|
name: { en: "English" }
|
|
3645
|
-
}], c =
|
|
3699
|
+
}], c = na(n);
|
|
3646
3700
|
if (r === "display") return /* @__PURE__ */ v("p", {
|
|
3647
3701
|
style: {
|
|
3648
3702
|
fontSize: 12.5,
|
|
@@ -3698,25 +3752,25 @@ function Xi({ field: e, fieldName: t, value: n, mode: r, onChange: i, fieldId: a
|
|
|
3698
3752
|
}
|
|
3699
3753
|
//#endregion
|
|
3700
3754
|
//#region src/components/fields/StructureField.tsx
|
|
3701
|
-
function
|
|
3755
|
+
function ia(e) {
|
|
3702
3756
|
let { field: t, value: n, mode: r, onChange: i, locale: a, fieldId: o } = e, { data: s } = J(), c = t.structure ? s?.structures?.[t.structure] : void 0;
|
|
3703
|
-
return c ? t.array ? /* @__PURE__ */ v(
|
|
3757
|
+
return c ? t.array ? /* @__PURE__ */ v(oa, {
|
|
3704
3758
|
structDef: c,
|
|
3705
3759
|
value: n,
|
|
3706
3760
|
mode: r,
|
|
3707
3761
|
onChange: i,
|
|
3708
3762
|
locale: a,
|
|
3709
3763
|
fieldId: o
|
|
3710
|
-
}) : /* @__PURE__ */ v(
|
|
3764
|
+
}) : /* @__PURE__ */ v(aa, {
|
|
3711
3765
|
structDef: c,
|
|
3712
3766
|
value: n,
|
|
3713
3767
|
mode: r,
|
|
3714
3768
|
onChange: i,
|
|
3715
3769
|
locale: a,
|
|
3716
3770
|
fieldId: o
|
|
3717
|
-
}) : /* @__PURE__ */ v(
|
|
3771
|
+
}) : /* @__PURE__ */ v($i, { ...e });
|
|
3718
3772
|
}
|
|
3719
|
-
function
|
|
3773
|
+
function aa({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId: a }) {
|
|
3720
3774
|
let o = typeof t == "object" && t && !Array.isArray(t) ? t : {}, s = e.fields.names(), c = {
|
|
3721
3775
|
display: "flex",
|
|
3722
3776
|
flexDirection: "column",
|
|
@@ -3752,13 +3806,13 @@ function Qi({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId:
|
|
|
3752
3806
|
minWidth: 0,
|
|
3753
3807
|
flex: 1
|
|
3754
3808
|
},
|
|
3755
|
-
children: n.type === "structure" && n.structure ? /* @__PURE__ */ v(
|
|
3809
|
+
children: n.type === "structure" && n.structure ? /* @__PURE__ */ v(ia, {
|
|
3756
3810
|
field: n,
|
|
3757
3811
|
fieldName: t,
|
|
3758
3812
|
value: r,
|
|
3759
3813
|
mode: "display",
|
|
3760
3814
|
locale: i
|
|
3761
|
-
}) :
|
|
3815
|
+
}) : Es({
|
|
3762
3816
|
field: n,
|
|
3763
3817
|
fieldName: t,
|
|
3764
3818
|
value: r,
|
|
@@ -3796,14 +3850,14 @@ function Qi({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId:
|
|
|
3796
3850
|
children: [/* @__PURE__ */ v(be, {
|
|
3797
3851
|
required: n.required,
|
|
3798
3852
|
children: n.display ? I(n.display.name) : t
|
|
3799
|
-
}), n.type === "structure" && n.structure ? /* @__PURE__ */ v(
|
|
3853
|
+
}), n.type === "structure" && n.structure ? /* @__PURE__ */ v(ia, {
|
|
3800
3854
|
field: n,
|
|
3801
3855
|
fieldName: t,
|
|
3802
3856
|
value: o[t],
|
|
3803
3857
|
mode: "edit",
|
|
3804
3858
|
onChange: l(t),
|
|
3805
3859
|
locale: i
|
|
3806
|
-
}) :
|
|
3860
|
+
}) : Es({
|
|
3807
3861
|
field: n,
|
|
3808
3862
|
fieldName: t,
|
|
3809
3863
|
value: o[t],
|
|
@@ -3815,7 +3869,7 @@ function Qi({ structDef: e, value: t, mode: n, onChange: r, locale: i, fieldId:
|
|
|
3815
3869
|
})
|
|
3816
3870
|
});
|
|
3817
3871
|
}
|
|
3818
|
-
function
|
|
3872
|
+
function oa({ structDef: t, value: n, mode: r, onChange: i, locale: a, fieldId: o }) {
|
|
3819
3873
|
let s = Array.isArray(n) ? n : [];
|
|
3820
3874
|
if (r === "display") return s.length === 0 ? /* @__PURE__ */ v("span", {
|
|
3821
3875
|
style: {
|
|
@@ -3829,7 +3883,7 @@ function $i({ structDef: t, value: n, mode: r, onChange: i, locale: a, fieldId:
|
|
|
3829
3883
|
flexDirection: "column",
|
|
3830
3884
|
gap: 8
|
|
3831
3885
|
},
|
|
3832
|
-
children: s.map((e, n) => /* @__PURE__ */ v(
|
|
3886
|
+
children: s.map((e, n) => /* @__PURE__ */ v(aa, {
|
|
3833
3887
|
structDef: t,
|
|
3834
3888
|
value: e,
|
|
3835
3889
|
mode: "display",
|
|
@@ -3855,7 +3909,7 @@ function $i({ structDef: t, value: n, mode: r, onChange: i, locale: a, fieldId:
|
|
|
3855
3909
|
role: "group",
|
|
3856
3910
|
children: [s.map((n, r) => /* @__PURE__ */ y("div", {
|
|
3857
3911
|
style: { position: "relative" },
|
|
3858
|
-
children: [/* @__PURE__ */ v(
|
|
3912
|
+
children: [/* @__PURE__ */ v(aa, {
|
|
3859
3913
|
structDef: t,
|
|
3860
3914
|
value: n,
|
|
3861
3915
|
mode: "edit",
|
|
@@ -3883,16 +3937,16 @@ function $i({ structDef: t, value: n, mode: r, onChange: i, locale: a, fieldId:
|
|
|
3883
3937
|
}
|
|
3884
3938
|
//#endregion
|
|
3885
3939
|
//#region src/components/fields/SecretField.tsx
|
|
3886
|
-
var
|
|
3887
|
-
function
|
|
3888
|
-
let [s, c] = f(""), l = a !== void 0, u = n ===
|
|
3940
|
+
var sa = "[SET]";
|
|
3941
|
+
function ca({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a, fieldId: o }) {
|
|
3942
|
+
let [s, c] = f(""), l = a !== void 0, u = n === sa || typeof n == "string" && n !== "";
|
|
3889
3943
|
return r === "display" ? u ? /* @__PURE__ */ v("span", {
|
|
3890
3944
|
className: "mono",
|
|
3891
3945
|
style: {
|
|
3892
3946
|
fontSize: 12.5,
|
|
3893
3947
|
color: "var(--text-3)"
|
|
3894
3948
|
},
|
|
3895
|
-
children:
|
|
3949
|
+
children: sa
|
|
3896
3950
|
}) : /* @__PURE__ */ v("span", {
|
|
3897
3951
|
style: {
|
|
3898
3952
|
fontSize: 12.5,
|
|
@@ -3906,23 +3960,23 @@ function ta({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a,
|
|
|
3906
3960
|
ariaRequired: e.required,
|
|
3907
3961
|
value: s,
|
|
3908
3962
|
onChange: (e) => {
|
|
3909
|
-
c(e), l && e === "" ? i?.(u ?
|
|
3963
|
+
c(e), l && e === "" ? i?.(u ? sa : "") : i?.(e);
|
|
3910
3964
|
},
|
|
3911
3965
|
placeholder: l ? "Leave blank to keep existing value" : "Enter value"
|
|
3912
3966
|
});
|
|
3913
3967
|
}
|
|
3914
3968
|
//#endregion
|
|
3915
3969
|
//#region src/components/fields/PasswordField.tsx
|
|
3916
|
-
var
|
|
3917
|
-
function
|
|
3918
|
-
let [s, c] = f(""), l = a !== void 0, u = n ===
|
|
3970
|
+
var la = "[SET]";
|
|
3971
|
+
function ua({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a, fieldId: o }) {
|
|
3972
|
+
let [s, c] = f(""), l = a !== void 0, u = n === la || typeof n == "string" && n !== "";
|
|
3919
3973
|
return r === "display" ? u ? /* @__PURE__ */ v("span", {
|
|
3920
3974
|
className: "mono",
|
|
3921
3975
|
style: {
|
|
3922
3976
|
fontSize: 12.5,
|
|
3923
3977
|
color: "var(--text-3)"
|
|
3924
3978
|
},
|
|
3925
|
-
children:
|
|
3979
|
+
children: la
|
|
3926
3980
|
}) : /* @__PURE__ */ v("span", {
|
|
3927
3981
|
style: {
|
|
3928
3982
|
fontSize: 12.5,
|
|
@@ -3936,18 +3990,18 @@ function ra({ field: e, fieldName: t, value: n, mode: r, onChange: i, record: a,
|
|
|
3936
3990
|
ariaRequired: e.required,
|
|
3937
3991
|
value: s,
|
|
3938
3992
|
onChange: (e) => {
|
|
3939
|
-
c(e), l && e === "" ? i?.(u ?
|
|
3993
|
+
c(e), l && e === "" ? i?.(u ? la : "") : i?.(e);
|
|
3940
3994
|
},
|
|
3941
3995
|
placeholder: l ? "Leave blank to keep existing value" : "Enter password"
|
|
3942
3996
|
});
|
|
3943
3997
|
}
|
|
3944
3998
|
//#endregion
|
|
3945
3999
|
//#region src/components/fields/StringArrayField.tsx
|
|
3946
|
-
function
|
|
4000
|
+
function da(e) {
|
|
3947
4001
|
return Array.isArray(e) ? e.filter((e) => e != null).map(String) : [];
|
|
3948
4002
|
}
|
|
3949
|
-
function
|
|
3950
|
-
let s =
|
|
4003
|
+
function fa({ field: t, fieldName: n, value: r, mode: i, onChange: a, fieldId: o }) {
|
|
4004
|
+
let s = da(r), [c, l] = f("");
|
|
3951
4005
|
if (i === "display") return s.length === 0 ? /* @__PURE__ */ v("span", {
|
|
3952
4006
|
style: {
|
|
3953
4007
|
fontSize: 12.5,
|
|
@@ -4016,11 +4070,11 @@ function aa({ field: t, fieldName: n, value: r, mode: i, onChange: a, fieldId: o
|
|
|
4016
4070
|
}
|
|
4017
4071
|
//#endregion
|
|
4018
4072
|
//#region src/components/fields/IntArrayField.tsx
|
|
4019
|
-
function
|
|
4073
|
+
function pa(e) {
|
|
4020
4074
|
return Array.isArray(e) ? e.filter((e) => e != null).map(Number).filter((e) => !isNaN(e)) : [];
|
|
4021
4075
|
}
|
|
4022
|
-
function
|
|
4023
|
-
let s =
|
|
4076
|
+
function ma({ field: t, fieldName: n, value: r, mode: i, onChange: a, fieldId: o }) {
|
|
4077
|
+
let s = pa(r), [c, l] = f("");
|
|
4024
4078
|
if (i === "display") return s.length === 0 ? /* @__PURE__ */ v("span", {
|
|
4025
4079
|
style: {
|
|
4026
4080
|
fontSize: 12.5,
|
|
@@ -4092,47 +4146,47 @@ function sa({ field: t, fieldName: n, value: r, mode: i, onChange: a, fieldId: o
|
|
|
4092
4146
|
}
|
|
4093
4147
|
//#endregion
|
|
4094
4148
|
//#region src/lib/rich-text.ts
|
|
4095
|
-
var
|
|
4096
|
-
function
|
|
4097
|
-
return typeof e == "string" ? e :
|
|
4149
|
+
var ha = /declarion:\/\/file\/([0-9a-fA-F-]{36})/g;
|
|
4150
|
+
function ga(e) {
|
|
4151
|
+
return typeof e == "string" ? e : wa(e) && typeof e.markdown == "string" ? e.markdown : "";
|
|
4098
4152
|
}
|
|
4099
|
-
function
|
|
4153
|
+
function _a(e, t) {
|
|
4100
4154
|
return {
|
|
4101
|
-
markdown:
|
|
4102
|
-
files:
|
|
4155
|
+
markdown: ga(e),
|
|
4156
|
+
files: ba(t)
|
|
4103
4157
|
};
|
|
4104
4158
|
}
|
|
4105
|
-
function
|
|
4106
|
-
let n =
|
|
4159
|
+
function va(e, t) {
|
|
4160
|
+
let n = _a(e, null);
|
|
4107
4161
|
return n.files[t.id] = t, n;
|
|
4108
4162
|
}
|
|
4109
|
-
function
|
|
4110
|
-
let n =
|
|
4163
|
+
function ya(e, t) {
|
|
4164
|
+
let n = _a(e, null);
|
|
4111
4165
|
for (let e of t) delete n.files[e];
|
|
4112
4166
|
return n;
|
|
4113
4167
|
}
|
|
4114
|
-
function
|
|
4168
|
+
function ba(e) {
|
|
4115
4169
|
if (!Array.isArray(e)) return {};
|
|
4116
4170
|
let t = {};
|
|
4117
|
-
for (let n of e)
|
|
4171
|
+
for (let n of e) wa(n) && typeof n.id == "string" && (t[n.id] = n);
|
|
4118
4172
|
return t;
|
|
4119
4173
|
}
|
|
4120
|
-
function
|
|
4174
|
+
function xa(e) {
|
|
4121
4175
|
let t = /* @__PURE__ */ new Set(), n = [], r;
|
|
4122
|
-
for (
|
|
4176
|
+
for (ha.lastIndex = 0; (r = ha.exec(e)) !== null;) {
|
|
4123
4177
|
let e = r[1];
|
|
4124
4178
|
t.has(e) || (t.add(e), n.push(e));
|
|
4125
4179
|
}
|
|
4126
4180
|
return n;
|
|
4127
4181
|
}
|
|
4128
|
-
function
|
|
4182
|
+
function Sa(e) {
|
|
4129
4183
|
return e ? /^declarion:\/\/file\/([0-9a-fA-F-]{36})$/.exec(e)?.[1] ?? null : null;
|
|
4130
4184
|
}
|
|
4131
|
-
function
|
|
4185
|
+
function Ca(e) {
|
|
4132
4186
|
let t = `declarion://file/${e.id}`;
|
|
4133
4187
|
return e.content_type.startsWith("image/") ? `` : `[${e.filename || e.id}](${t})`;
|
|
4134
4188
|
}
|
|
4135
|
-
function
|
|
4189
|
+
function wa(e) {
|
|
4136
4190
|
return typeof e == "object" && !!e;
|
|
4137
4191
|
}
|
|
4138
4192
|
//#endregion
|
|
@@ -4144,10 +4198,10 @@ var Q = class extends Error {
|
|
|
4144
4198
|
super(n), this.code = t, this.status = e;
|
|
4145
4199
|
}
|
|
4146
4200
|
};
|
|
4147
|
-
async function
|
|
4201
|
+
async function Ta(e) {
|
|
4148
4202
|
let t = bt();
|
|
4149
4203
|
try {
|
|
4150
|
-
return await
|
|
4204
|
+
return await Ea(e, t ? await Et() : null);
|
|
4151
4205
|
} catch (n) {
|
|
4152
4206
|
if (!(n instanceof Q && n.status === 401 && (n.code === "TOKEN_REFRESH_NEEDED" || n.code === "UNAUTHORIZED"))) throw n;
|
|
4153
4207
|
let r = null;
|
|
@@ -4157,17 +4211,17 @@ async function va(e) {
|
|
|
4157
4211
|
throw pn()(), n;
|
|
4158
4212
|
}
|
|
4159
4213
|
try {
|
|
4160
|
-
return await
|
|
4214
|
+
return await Ea(e, r);
|
|
4161
4215
|
} catch (e) {
|
|
4162
4216
|
throw e instanceof Q && e.status === 401 && pn()(), e;
|
|
4163
4217
|
}
|
|
4164
4218
|
}
|
|
4165
4219
|
}
|
|
4166
|
-
function
|
|
4220
|
+
function Ea(e, t) {
|
|
4167
4221
|
let { file: n, entityCode: r, fieldCode: i, slotCode: a, onProgress: o, signal: s } = e;
|
|
4168
4222
|
return new Promise((e, c) => {
|
|
4169
4223
|
let l = new XMLHttpRequest();
|
|
4170
|
-
if (l.open("POST",
|
|
4224
|
+
if (l.open("POST", Da(r, i, a)), l.withCredentials = t === null, t && l.setRequestHeader("Authorization", `Bearer ${t}`), l.upload.onprogress = (e) => {
|
|
4171
4225
|
if (!o) return;
|
|
4172
4226
|
let t = e.lengthComputable ? e.total : n.size, r = t > 0 ? Math.min(100, Math.round(e.loaded / t * 100)) : 0;
|
|
4173
4227
|
o({
|
|
@@ -4181,7 +4235,7 @@ function ya(e, t) {
|
|
|
4181
4235
|
n = t ? JSON.parse(t) : null;
|
|
4182
4236
|
} catch {}
|
|
4183
4237
|
if (l.status >= 200 && l.status < 300) {
|
|
4184
|
-
let t =
|
|
4238
|
+
let t = Oa(n);
|
|
4185
4239
|
if (!t || !t.id) {
|
|
4186
4240
|
c(new Q(l.status, "BAD_RESPONSE", "Upload returned no file id"));
|
|
4187
4241
|
return;
|
|
@@ -4206,56 +4260,56 @@ function ya(e, t) {
|
|
|
4206
4260
|
u.append("file", n, n.name), l.send(u);
|
|
4207
4261
|
});
|
|
4208
4262
|
}
|
|
4209
|
-
function
|
|
4263
|
+
function Da(e, t, n) {
|
|
4210
4264
|
let r = new URLSearchParams();
|
|
4211
4265
|
e && t && (r.set("entity_code", e), r.set("field_code", t), n && r.set("slot_code", n));
|
|
4212
4266
|
let i = r.toString();
|
|
4213
4267
|
return i ? `/api/files/upload?${i}` : "/api/files/upload";
|
|
4214
4268
|
}
|
|
4215
|
-
function
|
|
4216
|
-
return
|
|
4269
|
+
function Oa(e) {
|
|
4270
|
+
return Aa(e) ? Aa(e.result) ? Oa(e.result) : Aa(e.file) ? ka(e.file) : typeof e.id == "string" ? e : null : null;
|
|
4217
4271
|
}
|
|
4218
|
-
function
|
|
4219
|
-
let t =
|
|
4272
|
+
function ka(e) {
|
|
4273
|
+
let t = ja(e.file_id);
|
|
4220
4274
|
return t ? {
|
|
4221
4275
|
id: t,
|
|
4222
|
-
filename:
|
|
4223
|
-
content_type:
|
|
4224
|
-
size_bytes:
|
|
4225
|
-
sha256:
|
|
4226
|
-
dedup:
|
|
4276
|
+
filename: ja(e.filename_original) ?? ja(e.filename_normalized) ?? t,
|
|
4277
|
+
content_type: ja(e.content_type) ?? "application/octet-stream",
|
|
4278
|
+
size_bytes: Ma(e.size_bytes) ?? 0,
|
|
4279
|
+
sha256: ja(e.sha256) ?? "",
|
|
4280
|
+
dedup: Na(e.dedup)
|
|
4227
4281
|
} : null;
|
|
4228
4282
|
}
|
|
4229
|
-
function
|
|
4283
|
+
function Aa(e) {
|
|
4230
4284
|
return typeof e == "object" && !!e;
|
|
4231
4285
|
}
|
|
4232
|
-
function
|
|
4286
|
+
function ja(e) {
|
|
4233
4287
|
return typeof e == "string" ? e : void 0;
|
|
4234
4288
|
}
|
|
4235
|
-
function
|
|
4289
|
+
function Ma(e) {
|
|
4236
4290
|
return typeof e == "number" ? e : void 0;
|
|
4237
4291
|
}
|
|
4238
|
-
function
|
|
4292
|
+
function Na(e) {
|
|
4239
4293
|
return typeof e == "boolean" ? e : void 0;
|
|
4240
4294
|
}
|
|
4241
|
-
async function
|
|
4295
|
+
async function Pa(e) {
|
|
4242
4296
|
await q("files.discard", { file_id: e });
|
|
4243
4297
|
}
|
|
4244
|
-
function
|
|
4298
|
+
function Fa(e, t, n) {
|
|
4245
4299
|
if (n && e.size > n) return {
|
|
4246
4300
|
code: "FILE_TOO_LARGE",
|
|
4247
|
-
message: `File is ${
|
|
4301
|
+
message: `File is ${La(e.size)}, max ${La(n)}`
|
|
4248
4302
|
};
|
|
4249
4303
|
if (t && t.length > 0) {
|
|
4250
4304
|
let n = e.type || "application/octet-stream";
|
|
4251
|
-
if (!t.some((e) =>
|
|
4305
|
+
if (!t.some((e) => Ia(e, n))) return {
|
|
4252
4306
|
code: "MIME_NOT_ACCEPTED",
|
|
4253
4307
|
message: `File type ${n} is not accepted`
|
|
4254
4308
|
};
|
|
4255
4309
|
}
|
|
4256
4310
|
return null;
|
|
4257
4311
|
}
|
|
4258
|
-
function
|
|
4312
|
+
function Ia(e, t) {
|
|
4259
4313
|
if (e === "*/*" || e === "*") return !0;
|
|
4260
4314
|
if (e.endsWith("/*")) {
|
|
4261
4315
|
let n = e.slice(0, e.length - 1);
|
|
@@ -4263,7 +4317,7 @@ function ka(e, t) {
|
|
|
4263
4317
|
}
|
|
4264
4318
|
return e === t;
|
|
4265
4319
|
}
|
|
4266
|
-
function
|
|
4320
|
+
function La(e) {
|
|
4267
4321
|
if (e < 1024) return `${e} B`;
|
|
4268
4322
|
let t = [
|
|
4269
4323
|
"KB",
|
|
@@ -4275,7 +4329,7 @@ function Aa(e) {
|
|
|
4275
4329
|
}
|
|
4276
4330
|
//#endregion
|
|
4277
4331
|
//#region src/components/file-widgets/draft-scope.tsx
|
|
4278
|
-
var
|
|
4332
|
+
var Ra = r({
|
|
4279
4333
|
registerDraft() {},
|
|
4280
4334
|
unregisterDraft() {},
|
|
4281
4335
|
hasDraft() {
|
|
@@ -4284,7 +4338,7 @@ var ja = r({
|
|
|
4284
4338
|
flushAllDrafts: async () => {},
|
|
4285
4339
|
markCommitted() {}
|
|
4286
4340
|
});
|
|
4287
|
-
function
|
|
4341
|
+
function za({ children: e }) {
|
|
4288
4342
|
let t = d(/* @__PURE__ */ new Map()), n = u(() => ({
|
|
4289
4343
|
registerDraft(e) {
|
|
4290
4344
|
t.current.set(e.fileId, e);
|
|
@@ -4303,16 +4357,16 @@ function Ma({ children: e }) {
|
|
|
4303
4357
|
t.current.clear(), await Promise.allSettled(e.map((e) => Promise.resolve(e.discard())));
|
|
4304
4358
|
}
|
|
4305
4359
|
}), []);
|
|
4306
|
-
return /* @__PURE__ */ v(
|
|
4360
|
+
return /* @__PURE__ */ v(Ra.Provider, {
|
|
4307
4361
|
value: n,
|
|
4308
4362
|
children: e
|
|
4309
4363
|
});
|
|
4310
4364
|
}
|
|
4311
|
-
function
|
|
4312
|
-
return s(
|
|
4365
|
+
function Ba() {
|
|
4366
|
+
return s(Ra);
|
|
4313
4367
|
}
|
|
4314
|
-
function
|
|
4315
|
-
let e =
|
|
4368
|
+
function Va() {
|
|
4369
|
+
let e = Ba();
|
|
4316
4370
|
return {
|
|
4317
4371
|
register: o((t, n) => {
|
|
4318
4372
|
e.registerDraft({
|
|
@@ -4331,17 +4385,17 @@ function Pa() {
|
|
|
4331
4385
|
}
|
|
4332
4386
|
//#endregion
|
|
4333
4387
|
//#region src/components/fields/RichTextField.tsx
|
|
4334
|
-
function
|
|
4335
|
-
let { field: n, entityCode: r, fieldName: i, value: a, mode: o, onChange: s, record: c, compact: l, fieldId: p } = t, m = d(null), h = d(null), g = d(/* @__PURE__ */ new Map()), _ = d(/* @__PURE__ */ new Set()), [b, x] = f(0), [S, C] = f(null), { register: w, unregister: E } =
|
|
4336
|
-
let n = new Set(
|
|
4388
|
+
function Ha(t) {
|
|
4389
|
+
let { field: n, entityCode: r, fieldName: i, value: a, mode: o, onChange: s, record: c, compact: l, fieldId: p } = t, m = d(null), h = d(null), g = d(/* @__PURE__ */ new Map()), _ = d(/* @__PURE__ */ new Set()), [b, x] = f(0), [S, C] = f(null), { register: w, unregister: E } = Va(), D = c?.$files?.[i], O = u(() => _a(a, D), [D, a]), k = O.markdown, A = n.files?.accepts, ee = n.files?.max_size_bytes, j = (e, t = O.files) => {
|
|
4390
|
+
let n = new Set(xa(e)), r = [];
|
|
4337
4391
|
for (let e of _.current) n.has(e) || r.push(e);
|
|
4338
4392
|
if (r.length > 0) {
|
|
4339
4393
|
for (let e of r) {
|
|
4340
|
-
_.current.delete(e), E(e),
|
|
4394
|
+
_.current.delete(e), E(e), Pa(e).catch(() => {});
|
|
4341
4395
|
let t = g.current.get(e);
|
|
4342
4396
|
t && (URL.revokeObjectURL(t), g.current.delete(e));
|
|
4343
4397
|
}
|
|
4344
|
-
s?.(
|
|
4398
|
+
s?.(ya({
|
|
4345
4399
|
markdown: e,
|
|
4346
4400
|
files: t
|
|
4347
4401
|
}, r));
|
|
@@ -4353,7 +4407,7 @@ function Fa(t) {
|
|
|
4353
4407
|
});
|
|
4354
4408
|
}, te = (e, t, n) => {
|
|
4355
4409
|
let r = m.current, i = r?.selectionStart ?? e.markdown.length, a = r?.selectionEnd ?? e.markdown.length;
|
|
4356
|
-
j(`${e.markdown.slice(0, i)}${t}${e.markdown.slice(a)}`, n ?
|
|
4410
|
+
j(`${e.markdown.slice(0, i)}${t}${e.markdown.slice(a)}`, n ? va(e, n).files : e.files), requestAnimationFrame(() => {
|
|
4357
4411
|
if (!r) return;
|
|
4358
4412
|
let e = i + t.length;
|
|
4359
4413
|
r.focus(), r.setSelectionRange(e, e);
|
|
@@ -4368,28 +4422,28 @@ function Fa(t) {
|
|
|
4368
4422
|
files: O.files
|
|
4369
4423
|
};
|
|
4370
4424
|
for (let e of t) {
|
|
4371
|
-
let n =
|
|
4425
|
+
let n = Fa(e, A, ee);
|
|
4372
4426
|
if (n) {
|
|
4373
4427
|
C(n.message), x((e) => e - 1);
|
|
4374
4428
|
continue;
|
|
4375
4429
|
}
|
|
4376
4430
|
try {
|
|
4377
|
-
let n = await
|
|
4431
|
+
let n = await Ta({
|
|
4378
4432
|
file: e,
|
|
4379
4433
|
entityCode: r,
|
|
4380
4434
|
fieldCode: i
|
|
4381
4435
|
}), o = e.type.startsWith("image/") ? URL.createObjectURL(e) : void 0;
|
|
4382
4436
|
o && g.current.set(n.id, o);
|
|
4383
|
-
let s =
|
|
4384
|
-
if (w(n.id, () =>
|
|
4385
|
-
let e =
|
|
4386
|
-
te(a, e, s), a =
|
|
4437
|
+
let s = Wa(n, o);
|
|
4438
|
+
if (w(n.id, () => Pa(n.id)), _.current.add(n.id), t.length === 1) {
|
|
4439
|
+
let e = Ua(a.markdown, Ca(s));
|
|
4440
|
+
te(a, e, s), a = va({
|
|
4387
4441
|
markdown: `${a.markdown}${e}`,
|
|
4388
4442
|
files: a.files
|
|
4389
4443
|
}, s);
|
|
4390
4444
|
} else {
|
|
4391
|
-
let e =
|
|
4392
|
-
a =
|
|
4445
|
+
let e = Ua(a.markdown, Ca(s));
|
|
4446
|
+
a = va({
|
|
4393
4447
|
markdown: `${a.markdown}${e}`,
|
|
4394
4448
|
files: a.files
|
|
4395
4449
|
}, s), j(a.markdown, a.files);
|
|
@@ -4531,10 +4585,10 @@ function Fa(t) {
|
|
|
4531
4585
|
]
|
|
4532
4586
|
});
|
|
4533
4587
|
}
|
|
4534
|
-
function
|
|
4588
|
+
function Ua(e, t) {
|
|
4535
4589
|
return e ? e.endsWith("\n\n") ? t : e.endsWith("\n") ? `\n${t}` : `\n\n${t}` : `${t}\n`;
|
|
4536
4590
|
}
|
|
4537
|
-
function
|
|
4591
|
+
function Wa(e, t) {
|
|
4538
4592
|
return {
|
|
4539
4593
|
id: e.id,
|
|
4540
4594
|
filename: e.filename,
|
|
@@ -4549,8 +4603,8 @@ function La(e, t) {
|
|
|
4549
4603
|
}
|
|
4550
4604
|
//#endregion
|
|
4551
4605
|
//#region src/components/fields/cells/factories/text.ts
|
|
4552
|
-
var
|
|
4553
|
-
let { field: t, fieldName: n, locale: r = "en" } = e, i =
|
|
4606
|
+
var Ga = () => (e) => e == null || e === "" ? "—" : F(e), Ka = (e) => {
|
|
4607
|
+
let { field: t, fieldName: n, locale: r = "en" } = e, i = qa(t, n, r);
|
|
4554
4608
|
return (e) => {
|
|
4555
4609
|
if (e == null) return "—";
|
|
4556
4610
|
let t = !!e;
|
|
@@ -4561,7 +4615,7 @@ var Ra = () => (e) => e == null || e === "" ? "—" : F(e), za = (e) => {
|
|
|
4561
4615
|
});
|
|
4562
4616
|
};
|
|
4563
4617
|
};
|
|
4564
|
-
function
|
|
4618
|
+
function qa(e, t, n) {
|
|
4565
4619
|
if (e.display?.bool_labels) return {
|
|
4566
4620
|
trueLabel: I(e.display.bool_labels.true, n) || "Yes",
|
|
4567
4621
|
falseLabel: I(e.display.bool_labels.false, n) || "No"
|
|
@@ -4582,14 +4636,14 @@ function Ba(e, t, n) {
|
|
|
4582
4636
|
};
|
|
4583
4637
|
}
|
|
4584
4638
|
if (t.startsWith("is_")) {
|
|
4585
|
-
let e =
|
|
4639
|
+
let e = Ja(t.slice(3));
|
|
4586
4640
|
return {
|
|
4587
4641
|
trueLabel: e,
|
|
4588
4642
|
falseLabel: `Not ${e}`
|
|
4589
4643
|
};
|
|
4590
4644
|
}
|
|
4591
4645
|
if (t.startsWith("has_")) {
|
|
4592
|
-
let e =
|
|
4646
|
+
let e = Ja(t.slice(4));
|
|
4593
4647
|
return {
|
|
4594
4648
|
trueLabel: e,
|
|
4595
4649
|
falseLabel: `No ${e}`
|
|
@@ -4600,12 +4654,12 @@ function Ba(e, t, n) {
|
|
|
4600
4654
|
falseLabel: "No"
|
|
4601
4655
|
};
|
|
4602
4656
|
}
|
|
4603
|
-
function
|
|
4657
|
+
function Ja(e) {
|
|
4604
4658
|
return e.split("_").map((e) => e && e[0].toUpperCase() + e.slice(1)).join(" ");
|
|
4605
4659
|
}
|
|
4606
4660
|
//#endregion
|
|
4607
4661
|
//#region src/components/fields/cells/factories/badge.tsx
|
|
4608
|
-
var
|
|
4662
|
+
var Ya = /* @__PURE__ */ new Set([
|
|
4609
4663
|
"indigo",
|
|
4610
4664
|
"emerald",
|
|
4611
4665
|
"amber",
|
|
@@ -4615,17 +4669,17 @@ var Ha = /* @__PURE__ */ new Set([
|
|
|
4615
4669
|
"slate",
|
|
4616
4670
|
"teal"
|
|
4617
4671
|
]);
|
|
4618
|
-
function
|
|
4619
|
-
return e &&
|
|
4672
|
+
function Xa(e) {
|
|
4673
|
+
return e && Ya.has(e) ? e : "slate";
|
|
4620
4674
|
}
|
|
4621
|
-
var
|
|
4675
|
+
var Za = (e) => {
|
|
4622
4676
|
let { field: t, locale: n = "en" } = e, r = /* @__PURE__ */ new Map();
|
|
4623
4677
|
if (t.values) for (let e of t.values) r.set(e.code, {
|
|
4624
|
-
tone:
|
|
4678
|
+
tone: Xa(e.color),
|
|
4625
4679
|
label: I(e.name, n) || e.code
|
|
4626
4680
|
});
|
|
4627
4681
|
if (t.display?.value_map) for (let [e, i] of Object.entries(t.display.value_map)) {
|
|
4628
|
-
let t = r.get(e), a = i.color ?
|
|
4682
|
+
let t = r.get(e), a = i.color ? Xa(i.color) : t?.tone ?? "slate", o = (i.label ? I(i.label, n) : "") || t?.label || e;
|
|
4629
4683
|
r.set(e, {
|
|
4630
4684
|
tone: a,
|
|
4631
4685
|
label: o
|
|
@@ -4640,7 +4694,7 @@ var Wa = (e) => {
|
|
|
4640
4694
|
children: n?.label ?? t
|
|
4641
4695
|
});
|
|
4642
4696
|
};
|
|
4643
|
-
},
|
|
4697
|
+
}, Qa = /* @__PURE__ */ new Set([
|
|
4644
4698
|
"indigo",
|
|
4645
4699
|
"emerald",
|
|
4646
4700
|
"amber",
|
|
@@ -4650,13 +4704,13 @@ var Wa = (e) => {
|
|
|
4650
4704
|
"slate",
|
|
4651
4705
|
"teal"
|
|
4652
4706
|
]);
|
|
4653
|
-
function
|
|
4654
|
-
return e &&
|
|
4707
|
+
function $a(e) {
|
|
4708
|
+
return e && Qa.has(e) ? e : "slate";
|
|
4655
4709
|
}
|
|
4656
|
-
var
|
|
4710
|
+
var eo = (e) => {
|
|
4657
4711
|
let { entity: t, locale: n = "en" } = e, r = /* @__PURE__ */ new Map();
|
|
4658
4712
|
if (t?.status_groups) for (let e of Object.values(t.status_groups)) for (let t of e.statuses) r.set(t.code, {
|
|
4659
|
-
tone:
|
|
4713
|
+
tone: $a(t.color),
|
|
4660
4714
|
label: I(t.name, n) || t.code
|
|
4661
4715
|
});
|
|
4662
4716
|
return (e) => {
|
|
@@ -4668,7 +4722,7 @@ var qa = (e) => {
|
|
|
4668
4722
|
children: n?.label ?? t
|
|
4669
4723
|
});
|
|
4670
4724
|
};
|
|
4671
|
-
},
|
|
4725
|
+
}, to = /* @__PURE__ */ new Set([
|
|
4672
4726
|
"indigo",
|
|
4673
4727
|
"emerald",
|
|
4674
4728
|
"amber",
|
|
@@ -4678,14 +4732,14 @@ var qa = (e) => {
|
|
|
4678
4732
|
"slate",
|
|
4679
4733
|
"teal"
|
|
4680
4734
|
]);
|
|
4681
|
-
function
|
|
4682
|
-
return e &&
|
|
4735
|
+
function no(e) {
|
|
4736
|
+
return e && to.has(e) ? e : null;
|
|
4683
4737
|
}
|
|
4684
|
-
var
|
|
4738
|
+
var ro = (e) => {
|
|
4685
4739
|
let { field: t, locale: n = "en" } = e, r = /* @__PURE__ */ new Map();
|
|
4686
4740
|
if (t.display?.value_map) for (let [e, i] of Object.entries(t.display.value_map)) r.set(e, {
|
|
4687
4741
|
label: i.label && I(i.label, n) || e,
|
|
4688
|
-
tone:
|
|
4742
|
+
tone: no(i.color)
|
|
4689
4743
|
});
|
|
4690
4744
|
return (e) => !Array.isArray(e) || e.length === 0 ? "—" : /* @__PURE__ */ v("span", {
|
|
4691
4745
|
style: {
|
|
@@ -4702,23 +4756,23 @@ var Xa = (e) => {
|
|
|
4702
4756
|
}, `${n}-${t}`) : /* @__PURE__ */ v(M, { children: i?.label ?? n }, `${n}-${t}`);
|
|
4703
4757
|
})
|
|
4704
4758
|
});
|
|
4705
|
-
},
|
|
4759
|
+
}, io = () => (e) => {
|
|
4706
4760
|
if (e == null || e === "") return "—";
|
|
4707
|
-
let { text: t, absolute: n } =
|
|
4761
|
+
let { text: t, absolute: n } = ki(typeof e == "string" ? e : F(e));
|
|
4708
4762
|
return /* @__PURE__ */ v("span", {
|
|
4709
4763
|
title: n,
|
|
4710
4764
|
children: t
|
|
4711
4765
|
});
|
|
4712
|
-
},
|
|
4766
|
+
}, ao = () => (e) => e == null || e === "" ? "—" : Oi(typeof e == "string" ? e : F(e)), oo = 60 * 1e3, so = 300 * 1e3, co = () => (e) => {
|
|
4713
4767
|
if (e == null || e === "") return "—";
|
|
4714
4768
|
let t = typeof e == "string" ? e : F(e), n = new Date(t);
|
|
4715
4769
|
if (isNaN(n.getTime())) return t;
|
|
4716
|
-
let r =
|
|
4770
|
+
let r = Oi(t), i = Date.now() - n.getTime();
|
|
4717
4771
|
if (i <= 0) return /* @__PURE__ */ y("span", {
|
|
4718
4772
|
title: r,
|
|
4719
4773
|
children: ["in ", S(n, /* @__PURE__ */ new Date(), { addSuffix: !1 })]
|
|
4720
4774
|
});
|
|
4721
|
-
if (i <=
|
|
4775
|
+
if (i <= oo) return /* @__PURE__ */ v("span", {
|
|
4722
4776
|
title: r,
|
|
4723
4777
|
children: /* @__PURE__ */ v(D, {
|
|
4724
4778
|
tone: "slate",
|
|
@@ -4730,13 +4784,13 @@ var Xa = (e) => {
|
|
|
4730
4784
|
return /* @__PURE__ */ v("span", {
|
|
4731
4785
|
title: r,
|
|
4732
4786
|
children: /* @__PURE__ */ y(D, {
|
|
4733
|
-
tone: i <=
|
|
4787
|
+
tone: i <= so ? "amber" : "rose",
|
|
4734
4788
|
size: "xs",
|
|
4735
4789
|
children: ["overdue ", a]
|
|
4736
4790
|
})
|
|
4737
4791
|
});
|
|
4738
|
-
},
|
|
4739
|
-
let { field: t, locale: n = "en" } = e, r = t.display?.currency || "USD", i = t.display?.currency_field, a =
|
|
4792
|
+
}, lo = (e) => {
|
|
4793
|
+
let { field: t, locale: n = "en" } = e, r = t.display?.currency || "USD", i = t.display?.currency_field, a = uo(t.display?.currency_display), o = fo(typeof t.scale == "number" ? t.scale : 2, 0, 6), s = /* @__PURE__ */ new Map();
|
|
4740
4794
|
return (e, t = {}) => {
|
|
4741
4795
|
if (e == null || e === "") return "—";
|
|
4742
4796
|
let c = typeof e == "number" ? e : Number(e);
|
|
@@ -4751,7 +4805,7 @@ var Xa = (e) => {
|
|
|
4751
4805
|
}), s.set(d, f)), f.format(c);
|
|
4752
4806
|
};
|
|
4753
4807
|
};
|
|
4754
|
-
function
|
|
4808
|
+
function uo(e) {
|
|
4755
4809
|
switch (e) {
|
|
4756
4810
|
case "narrow_symbol": return "narrowSymbol";
|
|
4757
4811
|
case "code":
|
|
@@ -4760,16 +4814,16 @@ function ro(e) {
|
|
|
4760
4814
|
default: return "symbol";
|
|
4761
4815
|
}
|
|
4762
4816
|
}
|
|
4763
|
-
function
|
|
4817
|
+
function fo(e, t, n) {
|
|
4764
4818
|
return e < t ? t : e > n ? n : e;
|
|
4765
4819
|
}
|
|
4766
4820
|
//#endregion
|
|
4767
4821
|
//#region src/components/fields/cells/factories/refLink.tsx
|
|
4768
|
-
var
|
|
4769
|
-
let { field: n, entities: r, screens: i, refs: a, surface: o } = e, s = n.ref?.entity, c = s ? r?.[s] : void 0, l = typeof a == "function" ? a : () => a, u = o === "detail", d = c?.display?.icon, f = n.display?.ref_display_field
|
|
4822
|
+
var po = (e) => {
|
|
4823
|
+
let { field: n, entities: r, screens: i, refs: a, surface: o } = e, s = n.ref?.entity, c = s ? r?.[s] : void 0, l = typeof a == "function" ? a : () => a, u = o === "detail", d = c?.display?.icon, f = n.display?.ref_display_field || "$display", p = c?.detail_screen, m = (p ? i?.[p] : void 0)?.route;
|
|
4770
4824
|
return (e, n) => {
|
|
4771
4825
|
if (e == null || e === "") return "—";
|
|
4772
|
-
let r = F(e), i =
|
|
4826
|
+
let r = F(e), i = mo(r, s, l(), f), a = m ? m.replace(":id", encodeURIComponent(r)) : void 0;
|
|
4773
4827
|
if (u) {
|
|
4774
4828
|
let e = /* @__PURE__ */ y(_, { children: [d && /* @__PURE__ */ v("span", {
|
|
4775
4829
|
style: {
|
|
@@ -4811,29 +4865,29 @@ var ao = (e) => {
|
|
|
4811
4865
|
}) : i;
|
|
4812
4866
|
};
|
|
4813
4867
|
};
|
|
4814
|
-
function
|
|
4868
|
+
function mo(e, t, n, r) {
|
|
4815
4869
|
let i = t && n ? n[t]?.[e] : void 0;
|
|
4816
4870
|
return i ? L(i, r, e) : e;
|
|
4817
4871
|
}
|
|
4818
4872
|
//#endregion
|
|
4819
4873
|
//#region src/components/fields/cells/factories/url-helpers.ts
|
|
4820
|
-
var
|
|
4821
|
-
function
|
|
4822
|
-
return /^[a-z]{2,3}$/i.test(e) ||
|
|
4874
|
+
var ho = /^(https?|ftps?|ssh|mailto|tel):/i, go = /^(info|name|tech|site|cloud|online|store|shop|blog|space|world|link|live|page|zone|life|team|work|host|land|news|wiki|mobi|coop|aero|asia)$/i;
|
|
4875
|
+
function _o(e) {
|
|
4876
|
+
return /^[a-z]{2,3}$/i.test(e) || go.test(e);
|
|
4823
4877
|
}
|
|
4824
|
-
function
|
|
4878
|
+
function vo(e) {
|
|
4825
4879
|
if (!e.includes(".")) return !1;
|
|
4826
4880
|
let t = e.split(".");
|
|
4827
4881
|
if (t.length < 3) return !0;
|
|
4828
4882
|
let n = t[0].toLowerCase();
|
|
4829
|
-
return /^(com|org|net|edu|gov)$/.test(n) ? !1 : /^(io|app|dev)$/.test(n) ?
|
|
4883
|
+
return /^(com|org|net|edu|gov)$/.test(n) ? !1 : /^(io|app|dev)$/.test(n) ? _o(t[t.length - 1]) : !0;
|
|
4830
4884
|
}
|
|
4831
|
-
function
|
|
4832
|
-
if (
|
|
4885
|
+
function yo(e) {
|
|
4886
|
+
if (ho.test(e)) return e;
|
|
4833
4887
|
let t = e.match(/^([a-z][a-z0-9+.-]*):/i);
|
|
4834
4888
|
if (t) {
|
|
4835
4889
|
let n = t[1], r = e.slice(t[0].length);
|
|
4836
|
-
if (/^\d+([/?#]|$)/.test(r) &&
|
|
4890
|
+
if (/^\d+([/?#]|$)/.test(r) && vo(n)) {
|
|
4837
4891
|
let t = parseInt(r, 10);
|
|
4838
4892
|
if (t >= 1 && t <= 65535) return `https://${e}`;
|
|
4839
4893
|
}
|
|
@@ -4841,14 +4895,14 @@ function fo(e) {
|
|
|
4841
4895
|
}
|
|
4842
4896
|
return `https://${e}`;
|
|
4843
4897
|
}
|
|
4844
|
-
function
|
|
4898
|
+
function bo(e) {
|
|
4845
4899
|
try {
|
|
4846
4900
|
return new URL(e).hostname.replace(/^www\./i, "") || null;
|
|
4847
4901
|
} catch {
|
|
4848
4902
|
return null;
|
|
4849
4903
|
}
|
|
4850
4904
|
}
|
|
4851
|
-
function
|
|
4905
|
+
function xo(e, t) {
|
|
4852
4906
|
if (t !== "linkedin.com") return null;
|
|
4853
4907
|
try {
|
|
4854
4908
|
let t = new URL(e).pathname.match(/^\/(in|company|school)\/([^/]+)/i);
|
|
@@ -4856,7 +4910,7 @@ function mo(e, t) {
|
|
|
4856
4910
|
} catch {}
|
|
4857
4911
|
return null;
|
|
4858
4912
|
}
|
|
4859
|
-
function
|
|
4913
|
+
function So(e) {
|
|
4860
4914
|
try {
|
|
4861
4915
|
return new URL(e), !0;
|
|
4862
4916
|
} catch {
|
|
@@ -4865,7 +4919,7 @@ function ho(e) {
|
|
|
4865
4919
|
}
|
|
4866
4920
|
//#endregion
|
|
4867
4921
|
//#region src/components/fields/cells/factories/host-icons.tsx
|
|
4868
|
-
function
|
|
4922
|
+
function Co(e, t = "0 0 24 24") {
|
|
4869
4923
|
return (n) => /* @__PURE__ */ v("svg", {
|
|
4870
4924
|
width: 16,
|
|
4871
4925
|
height: 16,
|
|
@@ -4881,11 +4935,11 @@ function go(e, t = "0 0 24 24") {
|
|
|
4881
4935
|
children: e
|
|
4882
4936
|
});
|
|
4883
4937
|
}
|
|
4884
|
-
var
|
|
4938
|
+
var wo = Co(/* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("circle", {
|
|
4885
4939
|
cx: "12",
|
|
4886
4940
|
cy: "12",
|
|
4887
4941
|
r: "9"
|
|
4888
|
-
}), /* @__PURE__ */ v("path", { d: "M3 12h18M12 3c3 3 3 15 0 18-3-3-3-15 0-18" })] })),
|
|
4942
|
+
}), /* @__PURE__ */ v("path", { d: "M3 12h18M12 3c3 3 3 15 0 18-3-3-3-15 0-18" })] })), To = (e) => /* @__PURE__ */ v("svg", {
|
|
4889
4943
|
width: 16,
|
|
4890
4944
|
height: 16,
|
|
4891
4945
|
viewBox: "0 0 24 24",
|
|
@@ -4894,7 +4948,7 @@ var _o = go(/* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("circle", {
|
|
|
4894
4948
|
style: { flexShrink: 0 },
|
|
4895
4949
|
...e,
|
|
4896
4950
|
children: /* @__PURE__ */ v("path", { d: "M20.45 20.45h-3.55v-5.57c0-1.33-.02-3.04-1.85-3.04-1.85 0-2.13 1.45-2.13 2.94v5.67H9.36V9h3.41v1.56h.05c.48-.9 1.64-1.85 3.37-1.85 3.6 0 4.27 2.37 4.27 5.46v6.28zM5.34 7.43a2.06 2.06 0 1 1 0-4.12 2.06 2.06 0 0 1 0 4.12zM7.12 20.45H3.56V9h3.56v11.45zM22.22 0H1.77C.79 0 0 .77 0 1.72v20.56C0 23.23.79 24 1.77 24h20.45c.98 0 1.78-.77 1.78-1.72V1.72C24 .77 23.2 0 22.22 0z" })
|
|
4897
|
-
}),
|
|
4951
|
+
}), Eo = (e) => /* @__PURE__ */ v("svg", {
|
|
4898
4952
|
width: 16,
|
|
4899
4953
|
height: 16,
|
|
4900
4954
|
viewBox: "0 0 24 24",
|
|
@@ -4903,7 +4957,7 @@ var _o = go(/* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("circle", {
|
|
|
4903
4957
|
style: { flexShrink: 0 },
|
|
4904
4958
|
...e,
|
|
4905
4959
|
children: /* @__PURE__ */ v("path", { d: "M12 .5a11.5 11.5 0 0 0-3.64 22.41c.58.1.79-.25.79-.56 0-.27-.01-1-.02-1.96-3.21.7-3.89-1.55-3.89-1.55-.52-1.34-1.28-1.7-1.28-1.7-1.05-.72.08-.7.08-.7 1.16.08 1.77 1.2 1.77 1.2 1.03 1.77 2.71 1.26 3.37.96.1-.75.4-1.26.73-1.55-2.56-.29-5.26-1.28-5.26-5.71 0-1.26.45-2.3 1.19-3.11-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.18 1.19a11.05 11.05 0 0 1 5.79 0c2.21-1.5 3.18-1.19 3.18-1.19.63 1.59.23 2.76.11 3.05.74.81 1.19 1.85 1.19 3.11 0 4.44-2.71 5.42-5.29 5.7.41.36.78 1.07.78 2.16 0 1.56-.01 2.81-.01 3.19 0 .31.21.68.8.56A11.5 11.5 0 0 0 12 .5z" })
|
|
4906
|
-
}),
|
|
4960
|
+
}), Do = (e) => /* @__PURE__ */ v("svg", {
|
|
4907
4961
|
width: 16,
|
|
4908
4962
|
height: 16,
|
|
4909
4963
|
viewBox: "0 0 24 24",
|
|
@@ -4912,7 +4966,7 @@ var _o = go(/* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("circle", {
|
|
|
4912
4966
|
style: { flexShrink: 0 },
|
|
4913
4967
|
...e,
|
|
4914
4968
|
children: /* @__PURE__ */ v("path", { d: "M18.244 2H21.5l-7.62 8.71L23 22h-7.05l-5.52-7.21L4.07 22H.81l8.18-9.34L1 2h7.22l5 6.59L18.244 2zm-2.47 18h1.95L7.32 4h-2.1l10.55 16z" })
|
|
4915
|
-
}),
|
|
4969
|
+
}), Oo = (e) => /* @__PURE__ */ v("svg", {
|
|
4916
4970
|
width: 16,
|
|
4917
4971
|
height: 16,
|
|
4918
4972
|
viewBox: "0 0 24 24",
|
|
@@ -4921,7 +4975,7 @@ var _o = go(/* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("circle", {
|
|
|
4921
4975
|
style: { flexShrink: 0 },
|
|
4922
4976
|
...e,
|
|
4923
4977
|
children: /* @__PURE__ */ v("path", { d: "M23.5 6.2a3 3 0 0 0-2.1-2.1C19.5 3.6 12 3.6 12 3.6s-7.5 0-9.4.5A3 3 0 0 0 .5 6.2C0 8.1 0 12 0 12s0 3.9.5 5.8a3 3 0 0 0 2.1 2.1c1.9.5 9.4.5 9.4.5s7.5 0 9.4-.5a3 3 0 0 0 2.1-2.1c.5-1.9.5-5.8.5-5.8s0-3.9-.5-5.8zM9.6 15.6V8.4l6.2 3.6-6.2 3.6z" })
|
|
4924
|
-
}),
|
|
4978
|
+
}), ko = (e) => /* @__PURE__ */ v("svg", {
|
|
4925
4979
|
width: 16,
|
|
4926
4980
|
height: 16,
|
|
4927
4981
|
viewBox: "0 0 24 24",
|
|
@@ -4930,7 +4984,7 @@ var _o = go(/* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("circle", {
|
|
|
4930
4984
|
style: { flexShrink: 0 },
|
|
4931
4985
|
...e,
|
|
4932
4986
|
children: /* @__PURE__ */ v("path", { d: "M24 5.45v13.1A1.45 1.45 0 0 1 22.55 20H19.5V9.27L12 14.7 4.5 9.27V20H1.45A1.45 1.45 0 0 1 0 18.55V5.45A1.45 1.45 0 0 1 1.45 4h.5l10.05 7.27L22.05 4h.5A1.45 1.45 0 0 1 24 5.45z" })
|
|
4933
|
-
}),
|
|
4987
|
+
}), Ao = (e) => /* @__PURE__ */ y("svg", {
|
|
4934
4988
|
width: 16,
|
|
4935
4989
|
height: 16,
|
|
4936
4990
|
viewBox: "0 0 24 24",
|
|
@@ -4955,7 +5009,7 @@ var _o = go(/* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("circle", {
|
|
|
4955
5009
|
d: "M15.17 18.96a2.52 2.52 0 1 1-2.52 2.52v-2.52h2.52zm0-1.27a2.52 2.52 0 1 1 0-5.04h6.31a2.52 2.52 0 1 1 0 5.04h-6.31z"
|
|
4956
5010
|
})
|
|
4957
5011
|
]
|
|
4958
|
-
}),
|
|
5012
|
+
}), jo = (e) => /* @__PURE__ */ v("svg", {
|
|
4959
5013
|
width: 16,
|
|
4960
5014
|
height: 16,
|
|
4961
5015
|
viewBox: "0 0 24 24",
|
|
@@ -4964,39 +5018,39 @@ var _o = go(/* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("circle", {
|
|
|
4964
5018
|
style: { flexShrink: 0 },
|
|
4965
5019
|
...e,
|
|
4966
5020
|
children: /* @__PURE__ */ v("path", { d: "M4.46 3.83 14.94 3a3.7 3.7 0 0 1 2.5.62l3 2.16a1.4 1.4 0 0 1 .56 1.31v13.06a1.7 1.7 0 0 1-1.66 1.7l-12.5.78a2.4 2.4 0 0 1-1.85-.62L2.5 19.7a1.7 1.7 0 0 1-.5-1.2V5.16c0-.74.6-1.27 1.46-1.33l1-.01zm.46 1.86c-.31 0-.46.16-.46.47v12.25c0 .31.16.47.46.47l11.62-.7c.31 0 .46-.16.46-.47V6c0-.32-.16-.47-.46-.47L4.92 5.7zm5.57 2.32c.16 0 .31.16.31.31v.46l3.7.23c.31 0 .46.16.46.47v8.32c0 .31-.16.47-.46.47l-3.7.23c-.31 0-.46-.16-.46-.47V8.78c0-.16.15-.32.15-.46l-.04-.31z" })
|
|
4967
|
-
}),
|
|
4968
|
-
"linkedin.com":
|
|
4969
|
-
"github.com":
|
|
4970
|
-
"x.com":
|
|
4971
|
-
"twitter.com":
|
|
4972
|
-
"youtube.com":
|
|
4973
|
-
"youtu.be":
|
|
4974
|
-
"gmail.com":
|
|
4975
|
-
"mail.google.com":
|
|
4976
|
-
"slack.com":
|
|
4977
|
-
"notion.so":
|
|
4978
|
-
"notion.com":
|
|
5021
|
+
}), Mo = {
|
|
5022
|
+
"linkedin.com": To,
|
|
5023
|
+
"github.com": Eo,
|
|
5024
|
+
"x.com": Do,
|
|
5025
|
+
"twitter.com": Do,
|
|
5026
|
+
"youtube.com": Oo,
|
|
5027
|
+
"youtu.be": Oo,
|
|
5028
|
+
"gmail.com": ko,
|
|
5029
|
+
"mail.google.com": ko,
|
|
5030
|
+
"slack.com": Ao,
|
|
5031
|
+
"notion.so": jo,
|
|
5032
|
+
"notion.com": jo
|
|
4979
5033
|
};
|
|
4980
|
-
function
|
|
5034
|
+
function No(e, t) {
|
|
4981
5035
|
return !e || t === "none" ? null : t === "google" ? `https://www.google.com/s2/favicons?domain=${encodeURIComponent(e)}&sz=32` : `https://${e}/favicon.ico`;
|
|
4982
5036
|
}
|
|
4983
|
-
var
|
|
5037
|
+
var Po = {
|
|
4984
5038
|
width: 16,
|
|
4985
5039
|
height: 16,
|
|
4986
5040
|
flexShrink: 0,
|
|
4987
5041
|
objectFit: "contain"
|
|
4988
5042
|
};
|
|
4989
|
-
function
|
|
4990
|
-
let t = wr((e) => e.faviconSource), n = e ? e.toLowerCase() : "", r = n ?
|
|
5043
|
+
function Fo({ domain: e }) {
|
|
5044
|
+
let t = wr((e) => e.faviconSource), n = e ? e.toLowerCase() : "", r = n ? Mo[n] : void 0;
|
|
4991
5045
|
if (r) return /* @__PURE__ */ v(r, {});
|
|
4992
|
-
let i =
|
|
4993
|
-
return i ? /* @__PURE__ */ v(
|
|
5046
|
+
let i = No(n, t);
|
|
5047
|
+
return i ? /* @__PURE__ */ v(Io, { src: i }) : /* @__PURE__ */ v(wo, {});
|
|
4994
5048
|
}
|
|
4995
|
-
function
|
|
5049
|
+
function Io({ src: e }) {
|
|
4996
5050
|
let [t, n] = f(!1);
|
|
4997
5051
|
return c(() => {
|
|
4998
5052
|
n(!1);
|
|
4999
|
-
}, [e]), t ? /* @__PURE__ */ v(
|
|
5053
|
+
}, [e]), t ? /* @__PURE__ */ v(wo, {}) : /* @__PURE__ */ v("img", {
|
|
5000
5054
|
src: e,
|
|
5001
5055
|
alt: "",
|
|
5002
5056
|
width: 16,
|
|
@@ -5004,7 +5058,7 @@ function ko({ src: e }) {
|
|
|
5004
5058
|
loading: "lazy",
|
|
5005
5059
|
decoding: "async",
|
|
5006
5060
|
referrerPolicy: "no-referrer",
|
|
5007
|
-
style:
|
|
5061
|
+
style: Po,
|
|
5008
5062
|
onError: () => n(!0)
|
|
5009
5063
|
});
|
|
5010
5064
|
}
|
|
@@ -5014,72 +5068,72 @@ var $ = /* @__PURE__ */ v("span", {
|
|
|
5014
5068
|
color: "var(--text-4)"
|
|
5015
5069
|
},
|
|
5016
5070
|
children: "—"
|
|
5017
|
-
}),
|
|
5071
|
+
}), Lo = {
|
|
5018
5072
|
display: "inline-flex",
|
|
5019
5073
|
alignItems: "center",
|
|
5020
5074
|
gap: 4,
|
|
5021
5075
|
fontSize: 12.5,
|
|
5022
5076
|
color: "var(--accent)",
|
|
5023
5077
|
textDecoration: "none"
|
|
5024
|
-
},
|
|
5078
|
+
}, Ro = { fontSize: 12.5 }, zo = () => (t) => {
|
|
5025
5079
|
let n = t == null ? "" : F(t);
|
|
5026
5080
|
if (!n) return $;
|
|
5027
|
-
let r =
|
|
5028
|
-
if (r == null || !
|
|
5029
|
-
style:
|
|
5081
|
+
let r = yo(n);
|
|
5082
|
+
if (r == null || !So(r)) return /* @__PURE__ */ v("span", {
|
|
5083
|
+
style: Ro,
|
|
5030
5084
|
children: n
|
|
5031
5085
|
});
|
|
5032
|
-
let i =
|
|
5086
|
+
let i = bo(r), a = xo(r, i ?? "") ?? i ?? n;
|
|
5033
5087
|
return /* @__PURE__ */ y("a", {
|
|
5034
5088
|
href: r,
|
|
5035
5089
|
target: "_blank",
|
|
5036
5090
|
rel: "noopener noreferrer",
|
|
5037
5091
|
title: n,
|
|
5038
5092
|
className: "mono",
|
|
5039
|
-
style:
|
|
5093
|
+
style: Lo,
|
|
5040
5094
|
children: [
|
|
5041
|
-
/* @__PURE__ */ v(
|
|
5095
|
+
/* @__PURE__ */ v(Fo, { domain: i }),
|
|
5042
5096
|
a,
|
|
5043
5097
|
/* @__PURE__ */ v(e.external, { size: 11 })
|
|
5044
5098
|
]
|
|
5045
5099
|
});
|
|
5046
|
-
},
|
|
5100
|
+
}, Bo = {
|
|
5047
5101
|
fontSize: 12.5,
|
|
5048
5102
|
color: "var(--accent)",
|
|
5049
5103
|
textDecoration: "none"
|
|
5050
|
-
},
|
|
5104
|
+
}, Vo = () => (e) => {
|
|
5051
5105
|
let t = e == null ? "" : F(e);
|
|
5052
5106
|
return t ? /* @__PURE__ */ v("a", {
|
|
5053
5107
|
href: `mailto:${t}`,
|
|
5054
5108
|
className: "mono",
|
|
5055
|
-
style:
|
|
5109
|
+
style: Bo,
|
|
5056
5110
|
children: t
|
|
5057
5111
|
}) : $;
|
|
5058
|
-
},
|
|
5112
|
+
}, Ho = {
|
|
5059
5113
|
fontSize: 12.5,
|
|
5060
5114
|
color: "var(--accent)",
|
|
5061
5115
|
textDecoration: "none"
|
|
5062
|
-
},
|
|
5116
|
+
}, Uo = { fontSize: 12.5 }, Wo = /^[+()\-.\s\d]+$/, Go = () => (e) => {
|
|
5063
5117
|
let t = e == null ? "" : F(e);
|
|
5064
5118
|
if (!t) return $;
|
|
5065
5119
|
let n = t.trim();
|
|
5066
|
-
return
|
|
5120
|
+
return Wo.test(n) ? /* @__PURE__ */ v("a", {
|
|
5067
5121
|
href: `tel:${n.replace(/\s+/g, "")}`,
|
|
5068
5122
|
className: "mono",
|
|
5069
|
-
style:
|
|
5123
|
+
style: Ho,
|
|
5070
5124
|
children: t
|
|
5071
5125
|
}) : /* @__PURE__ */ v("span", {
|
|
5072
|
-
style:
|
|
5126
|
+
style: Uo,
|
|
5073
5127
|
children: t
|
|
5074
5128
|
});
|
|
5075
|
-
},
|
|
5129
|
+
}, Ko = {
|
|
5076
5130
|
fontSize: 12.5,
|
|
5077
5131
|
fontVariantNumeric: "tabular-nums"
|
|
5078
|
-
},
|
|
5132
|
+
}, qo = {
|
|
5079
5133
|
color: "var(--text-3)",
|
|
5080
5134
|
marginLeft: 4
|
|
5081
|
-
},
|
|
5082
|
-
function
|
|
5135
|
+
}, Jo = { fontSize: 12.5 };
|
|
5136
|
+
function Yo(e, t) {
|
|
5083
5137
|
let n = e.trim();
|
|
5084
5138
|
if (n === "" || n === "-") return n;
|
|
5085
5139
|
let r = n.startsWith("-"), [i, a] = (r ? n.slice(1) : n).split("."), o;
|
|
@@ -5091,45 +5145,45 @@ function Ho(e, t) {
|
|
|
5091
5145
|
let s = r ? `-${o}` : o;
|
|
5092
5146
|
return a !== void 0 && (s += `.${a}`), s;
|
|
5093
5147
|
}
|
|
5094
|
-
var
|
|
5148
|
+
var Xo = (e) => {
|
|
5095
5149
|
let { field: t, fieldName: n, locale: r = "en" } = e, i = new Intl.NumberFormat(r), a = t.type === "decimal", o = t.unit ? t.unit.display || t.unit.storage : void 0;
|
|
5096
5150
|
return (e, t) => {
|
|
5097
5151
|
if (e == null) return $;
|
|
5098
5152
|
let r = t.$units?.[n] || (o && !o.startsWith("$") ? o : void 0), s;
|
|
5099
|
-
if (a && typeof e == "string") s =
|
|
5153
|
+
if (a && typeof e == "string") s = Yo(e, i);
|
|
5100
5154
|
else {
|
|
5101
5155
|
let t = typeof e == "number" ? e : Number(e);
|
|
5102
5156
|
s = Number.isFinite(t) ? i.format(t) : null;
|
|
5103
5157
|
}
|
|
5104
5158
|
return s == null ? /* @__PURE__ */ v("span", {
|
|
5105
|
-
style:
|
|
5159
|
+
style: Jo,
|
|
5106
5160
|
children: "—"
|
|
5107
5161
|
}) : /* @__PURE__ */ y("span", {
|
|
5108
5162
|
className: "num",
|
|
5109
|
-
style:
|
|
5163
|
+
style: Ko,
|
|
5110
5164
|
children: [s, r && /* @__PURE__ */ v("span", {
|
|
5111
|
-
style:
|
|
5165
|
+
style: qo,
|
|
5112
5166
|
children: r
|
|
5113
5167
|
})]
|
|
5114
5168
|
});
|
|
5115
5169
|
};
|
|
5116
|
-
},
|
|
5170
|
+
}, Zo = { fontSize: 12.5 }, Qo = () => (e) => e == null || e === "" ? $ : /* @__PURE__ */ v("code", {
|
|
5117
5171
|
className: "mono",
|
|
5118
|
-
style:
|
|
5172
|
+
style: Zo,
|
|
5119
5173
|
children: F(e)
|
|
5120
|
-
}),
|
|
5174
|
+
}), $o = {
|
|
5121
5175
|
display: "inline-flex",
|
|
5122
5176
|
alignItems: "center",
|
|
5123
5177
|
gap: 4,
|
|
5124
5178
|
fontSize: 12.5,
|
|
5125
5179
|
color: "var(--accent)",
|
|
5126
5180
|
textDecoration: "none"
|
|
5127
|
-
},
|
|
5181
|
+
}, es = { fontSize: 12.5 }, ts = () => (t) => {
|
|
5128
5182
|
let n = t == null ? "" : F(t);
|
|
5129
5183
|
if (!n) return $;
|
|
5130
|
-
let r =
|
|
5131
|
-
return r == null || !
|
|
5132
|
-
style:
|
|
5184
|
+
let r = yo(n);
|
|
5185
|
+
return r == null || !So(r) ? /* @__PURE__ */ v("span", {
|
|
5186
|
+
style: es,
|
|
5133
5187
|
children: n
|
|
5134
5188
|
}) : /* @__PURE__ */ y("a", {
|
|
5135
5189
|
href: r,
|
|
@@ -5137,21 +5191,21 @@ var Uo = (e) => {
|
|
|
5137
5191
|
rel: "noopener noreferrer",
|
|
5138
5192
|
title: n,
|
|
5139
5193
|
className: "mono",
|
|
5140
|
-
style:
|
|
5194
|
+
style: $o,
|
|
5141
5195
|
children: [n, /* @__PURE__ */ v(e.external, { size: 11 })]
|
|
5142
5196
|
});
|
|
5143
|
-
},
|
|
5144
|
-
function
|
|
5145
|
-
return Math.max(1, Math.min(typeof e == "number" && Number.isFinite(e) ? Math.floor(e) :
|
|
5197
|
+
}, ns = 400, rs = 2e3;
|
|
5198
|
+
function is(e) {
|
|
5199
|
+
return Math.max(1, Math.min(typeof e == "number" && Number.isFinite(e) ? Math.floor(e) : ns, rs));
|
|
5146
5200
|
}
|
|
5147
|
-
function
|
|
5201
|
+
function as(e, t) {
|
|
5148
5202
|
return e.length <= t ? e : `${e.slice(0, t)}...`;
|
|
5149
5203
|
}
|
|
5150
|
-
function
|
|
5204
|
+
function os(e, t, n, r = 0) {
|
|
5151
5205
|
if (e == null || e === "") return "";
|
|
5152
|
-
if (typeof e == "string") return
|
|
5206
|
+
if (typeof e == "string") return as(e, t);
|
|
5153
5207
|
if (typeof e == "number" || typeof e == "boolean") return String(e);
|
|
5154
|
-
if (typeof e != "object") return
|
|
5208
|
+
if (typeof e != "object") return as(F(e), t);
|
|
5155
5209
|
if (n.has(e)) return "[Circular]";
|
|
5156
5210
|
if (r >= 3) return Array.isArray(e) ? "[...]" : "{...}";
|
|
5157
5211
|
n.add(e);
|
|
@@ -5162,30 +5216,30 @@ function $o(e, t, n, r = 0) {
|
|
|
5162
5216
|
a.push(a.length > 1 ? ",..." : "...");
|
|
5163
5217
|
break;
|
|
5164
5218
|
}
|
|
5165
|
-
let f =
|
|
5219
|
+
let f = os(c, d, n, r + 1);
|
|
5166
5220
|
if (a.push(u, f), a.join("").length >= t) {
|
|
5167
5221
|
a.push(",...");
|
|
5168
5222
|
break;
|
|
5169
5223
|
}
|
|
5170
5224
|
}
|
|
5171
|
-
return a.push(i), n.delete(e),
|
|
5225
|
+
return a.push(i), n.delete(e), as(a.join(""), t);
|
|
5172
5226
|
}
|
|
5173
|
-
function
|
|
5174
|
-
return
|
|
5227
|
+
function ss(e, t) {
|
|
5228
|
+
return os(e, t, /* @__PURE__ */ new WeakSet());
|
|
5175
5229
|
}
|
|
5176
|
-
var
|
|
5177
|
-
let t = e.surface ?? "detail", n =
|
|
5230
|
+
var cs = (e) => {
|
|
5231
|
+
let t = e.surface ?? "detail", n = is(e.field.display?.list_preview?.max_chars);
|
|
5178
5232
|
return (r) => {
|
|
5179
|
-
if (
|
|
5233
|
+
if (Qi(r)) return $;
|
|
5180
5234
|
if (t === "list") {
|
|
5181
|
-
let e =
|
|
5235
|
+
let e = ss(r, n);
|
|
5182
5236
|
return /* @__PURE__ */ v("span", {
|
|
5183
5237
|
className: "font-mono text-xs text-muted-foreground",
|
|
5184
5238
|
title: e,
|
|
5185
5239
|
children: e
|
|
5186
5240
|
});
|
|
5187
5241
|
}
|
|
5188
|
-
return /* @__PURE__ */ v(
|
|
5242
|
+
return /* @__PURE__ */ v($i, {
|
|
5189
5243
|
field: e.field,
|
|
5190
5244
|
fieldName: e.fieldName,
|
|
5191
5245
|
value: r,
|
|
@@ -5193,7 +5247,7 @@ var ts = (e) => {
|
|
|
5193
5247
|
locale: e.locale
|
|
5194
5248
|
});
|
|
5195
5249
|
};
|
|
5196
|
-
},
|
|
5250
|
+
}, ls = [
|
|
5197
5251
|
{
|
|
5198
5252
|
pattern: /```[^\n]*\n?([\s\S]*?)```/g,
|
|
5199
5253
|
replacement: "$1"
|
|
@@ -5256,13 +5310,13 @@ var ts = (e) => {
|
|
|
5256
5310
|
replacement: ""
|
|
5257
5311
|
}
|
|
5258
5312
|
];
|
|
5259
|
-
function
|
|
5313
|
+
function us(e) {
|
|
5260
5314
|
if (!e) return {
|
|
5261
5315
|
text: "",
|
|
5262
5316
|
isPlain: !0
|
|
5263
5317
|
};
|
|
5264
5318
|
let t = e, n = !1;
|
|
5265
|
-
for (let e of
|
|
5319
|
+
for (let e of ls) {
|
|
5266
5320
|
let r = t.replace(e.pattern, e.replacement);
|
|
5267
5321
|
r !== t && e.structural !== !1 && (n = !0), t = r;
|
|
5268
5322
|
}
|
|
@@ -5273,123 +5327,123 @@ function rs(e) {
|
|
|
5273
5327
|
}
|
|
5274
5328
|
//#endregion
|
|
5275
5329
|
//#region src/components/fields/cells/factories/markdown.tsx
|
|
5276
|
-
function
|
|
5330
|
+
function ds(e) {
|
|
5277
5331
|
return /* @__PURE__ */ v(li, { content: e });
|
|
5278
5332
|
}
|
|
5279
|
-
var
|
|
5333
|
+
var fs = (e) => {
|
|
5280
5334
|
let t = e.surface === "list";
|
|
5281
5335
|
return (e) => {
|
|
5282
5336
|
let n = e == null ? "" : F(e);
|
|
5283
5337
|
if (!n) return $;
|
|
5284
|
-
if (!t) return
|
|
5285
|
-
let { text: r, isPlain: i } =
|
|
5338
|
+
if (!t) return ds(n);
|
|
5339
|
+
let { text: r, isPlain: i } = us(n);
|
|
5286
5340
|
return i ? /* @__PURE__ */ v("span", {
|
|
5287
5341
|
title: r,
|
|
5288
5342
|
children: r
|
|
5289
5343
|
}) : /* @__PURE__ */ v(oe, {
|
|
5290
|
-
content:
|
|
5344
|
+
content: ds(n),
|
|
5291
5345
|
children: /* @__PURE__ */ v("span", {
|
|
5292
5346
|
title: r,
|
|
5293
5347
|
children: r
|
|
5294
5348
|
})
|
|
5295
5349
|
});
|
|
5296
5350
|
};
|
|
5297
|
-
},
|
|
5351
|
+
}, ps = "[SET]", ms = {
|
|
5298
5352
|
fontSize: 12.5,
|
|
5299
5353
|
color: "var(--text-3)"
|
|
5300
|
-
},
|
|
5354
|
+
}, hs = {
|
|
5301
5355
|
fontSize: 12.5,
|
|
5302
5356
|
color: "var(--text-4)",
|
|
5303
5357
|
fontStyle: "italic"
|
|
5304
|
-
},
|
|
5358
|
+
}, gs = () => (e) => e === ps || typeof e == "string" && e !== "" ? /* @__PURE__ */ v("span", {
|
|
5305
5359
|
className: "mono",
|
|
5306
|
-
style:
|
|
5307
|
-
children:
|
|
5360
|
+
style: ms,
|
|
5361
|
+
children: ps
|
|
5308
5362
|
}) : /* @__PURE__ */ v("span", {
|
|
5309
|
-
style:
|
|
5363
|
+
style: hs,
|
|
5310
5364
|
children: "Not set"
|
|
5311
5365
|
});
|
|
5312
5366
|
//#endregion
|
|
5313
5367
|
//#region src/components/fields/cells/factories/richTextPreview.tsx
|
|
5314
|
-
function
|
|
5368
|
+
function _s(e, t) {
|
|
5315
5369
|
return /* @__PURE__ */ v(li, {
|
|
5316
5370
|
content: e,
|
|
5317
5371
|
files: t
|
|
5318
5372
|
});
|
|
5319
5373
|
}
|
|
5320
|
-
var
|
|
5374
|
+
var vs = (e) => {
|
|
5321
5375
|
let { fieldName: t } = e, n = e.surface === "list";
|
|
5322
5376
|
return (e, r) => {
|
|
5323
|
-
let i = r?.$files?.[t], a =
|
|
5377
|
+
let i = r?.$files?.[t], a = _a(e, i);
|
|
5324
5378
|
if (!a.markdown) return $;
|
|
5325
|
-
if (!n) return
|
|
5326
|
-
let { text: o, isPlain: s } =
|
|
5379
|
+
if (!n) return _s(a.markdown, a.files);
|
|
5380
|
+
let { text: o, isPlain: s } = us(a.markdown);
|
|
5327
5381
|
return s ? /* @__PURE__ */ v("span", {
|
|
5328
5382
|
title: o,
|
|
5329
5383
|
children: o
|
|
5330
5384
|
}) : /* @__PURE__ */ v(oe, {
|
|
5331
|
-
content:
|
|
5385
|
+
content: _s(a.markdown, a.files),
|
|
5332
5386
|
children: /* @__PURE__ */ v("span", {
|
|
5333
5387
|
title: o,
|
|
5334
5388
|
children: o
|
|
5335
5389
|
})
|
|
5336
5390
|
});
|
|
5337
5391
|
};
|
|
5338
|
-
},
|
|
5392
|
+
}, ys = { fontSize: 12.5 }, bs = {
|
|
5339
5393
|
fontSize: 12.5,
|
|
5340
5394
|
whiteSpace: "pre-wrap",
|
|
5341
5395
|
margin: 0
|
|
5342
5396
|
};
|
|
5343
|
-
function
|
|
5397
|
+
function xs(e) {
|
|
5344
5398
|
return e == null ? {} : typeof e == "object" && !Array.isArray(e) ? e : typeof e == "string" ? { en: e } : {};
|
|
5345
5399
|
}
|
|
5346
|
-
function
|
|
5400
|
+
function Ss(e, t) {
|
|
5347
5401
|
if (t && typeof e[t] == "string" && e[t] !== "") return [t, e[t]];
|
|
5348
5402
|
for (let [t, n] of Object.entries(e)) if (typeof n == "string" && n !== "") return [t, n];
|
|
5349
5403
|
return null;
|
|
5350
5404
|
}
|
|
5351
5405
|
//#endregion
|
|
5352
5406
|
//#region src/components/fields/cells/registry.ts
|
|
5353
|
-
var
|
|
5354
|
-
text:
|
|
5355
|
-
bool_pill:
|
|
5356
|
-
badge:
|
|
5357
|
-
status_pill:
|
|
5358
|
-
tag_list:
|
|
5359
|
-
time_ago:
|
|
5360
|
-
timestamp_full:
|
|
5361
|
-
next_run:
|
|
5362
|
-
money:
|
|
5363
|
-
ref_link:
|
|
5364
|
-
url:
|
|
5365
|
-
email:
|
|
5366
|
-
phone:
|
|
5367
|
-
number:
|
|
5368
|
-
code:
|
|
5369
|
-
link:
|
|
5370
|
-
json:
|
|
5371
|
-
markdown:
|
|
5372
|
-
password_mask:
|
|
5373
|
-
rich_text_preview:
|
|
5407
|
+
var Cs = {
|
|
5408
|
+
text: Ga,
|
|
5409
|
+
bool_pill: Ka,
|
|
5410
|
+
badge: Za,
|
|
5411
|
+
status_pill: eo,
|
|
5412
|
+
tag_list: ro,
|
|
5413
|
+
time_ago: io,
|
|
5414
|
+
timestamp_full: ao,
|
|
5415
|
+
next_run: co,
|
|
5416
|
+
money: lo,
|
|
5417
|
+
ref_link: po,
|
|
5418
|
+
url: zo,
|
|
5419
|
+
email: Vo,
|
|
5420
|
+
phone: Go,
|
|
5421
|
+
number: Xo,
|
|
5422
|
+
code: Qo,
|
|
5423
|
+
link: ts,
|
|
5424
|
+
json: cs,
|
|
5425
|
+
markdown: fs,
|
|
5426
|
+
password_mask: gs,
|
|
5427
|
+
rich_text_preview: vs,
|
|
5374
5428
|
multilang_inline: (e) => {
|
|
5375
5429
|
let { field: t, locale: n } = e, r = t.type === "multilang_text";
|
|
5376
5430
|
return (e) => {
|
|
5377
|
-
let t =
|
|
5431
|
+
let t = Ss(xs(e), n);
|
|
5378
5432
|
if (!t) return r ? /* @__PURE__ */ v("p", {
|
|
5379
|
-
style:
|
|
5433
|
+
style: bs,
|
|
5380
5434
|
children: "—"
|
|
5381
5435
|
}) : /* @__PURE__ */ v("span", {
|
|
5382
|
-
style:
|
|
5436
|
+
style: ys,
|
|
5383
5437
|
children: "—"
|
|
5384
5438
|
});
|
|
5385
5439
|
let [i, a] = t;
|
|
5386
5440
|
return r ? /* @__PURE__ */ v("p", {
|
|
5387
|
-
style:
|
|
5441
|
+
style: bs,
|
|
5388
5442
|
lang: i,
|
|
5389
5443
|
dir: "auto",
|
|
5390
5444
|
children: a
|
|
5391
5445
|
}) : /* @__PURE__ */ v("span", {
|
|
5392
|
-
style:
|
|
5446
|
+
style: ys,
|
|
5393
5447
|
lang: i,
|
|
5394
5448
|
dir: "auto",
|
|
5395
5449
|
children: a
|
|
@@ -5397,53 +5451,53 @@ var gs = {
|
|
|
5397
5451
|
};
|
|
5398
5452
|
}
|
|
5399
5453
|
};
|
|
5400
|
-
Object.keys(
|
|
5401
|
-
function
|
|
5402
|
-
let t = e.field.display?.widget ?? "text", n =
|
|
5454
|
+
Object.keys(Cs).sort();
|
|
5455
|
+
function ws(e) {
|
|
5456
|
+
let t = e.field.display?.widget ?? "text", n = Cs[t];
|
|
5403
5457
|
if (!n) throw Error(`resolveCellRenderer: no factory registered for widget "${t}" (field "${e.fieldName}"). The engine must stamp a smart default at YAML-load time; an unknown widget here indicates an out-of-sync allow-list.`);
|
|
5404
5458
|
return n(e);
|
|
5405
5459
|
}
|
|
5406
5460
|
//#endregion
|
|
5407
5461
|
//#region src/components/fields/index.tsx
|
|
5408
|
-
var
|
|
5409
|
-
string:
|
|
5410
|
-
text:
|
|
5411
|
-
rich_text:
|
|
5412
|
-
int:
|
|
5413
|
-
float:
|
|
5414
|
-
decimal:
|
|
5415
|
-
bool:
|
|
5416
|
-
timestamp:
|
|
5417
|
-
date:
|
|
5418
|
-
time:
|
|
5419
|
-
enum:
|
|
5420
|
-
email:
|
|
5421
|
-
url:
|
|
5422
|
-
phone:
|
|
5423
|
-
uuid:
|
|
5424
|
-
bytes:
|
|
5425
|
-
ref:
|
|
5426
|
-
json:
|
|
5427
|
-
tags:
|
|
5428
|
-
string_array:
|
|
5429
|
-
int_array:
|
|
5430
|
-
uuid_array:
|
|
5431
|
-
multilang:
|
|
5432
|
-
multilang_text:
|
|
5433
|
-
structure:
|
|
5434
|
-
secret:
|
|
5435
|
-
password:
|
|
5462
|
+
var Ts = {
|
|
5463
|
+
string: yi,
|
|
5464
|
+
text: bi,
|
|
5465
|
+
rich_text: Ha,
|
|
5466
|
+
int: Vi,
|
|
5467
|
+
float: Vi,
|
|
5468
|
+
decimal: Vi,
|
|
5469
|
+
bool: Ri,
|
|
5470
|
+
timestamp: Li,
|
|
5471
|
+
date: Li,
|
|
5472
|
+
time: Li,
|
|
5473
|
+
enum: Si,
|
|
5474
|
+
email: Ci,
|
|
5475
|
+
url: wi,
|
|
5476
|
+
phone: Ti,
|
|
5477
|
+
uuid: yi,
|
|
5478
|
+
bytes: yi,
|
|
5479
|
+
ref: Yi,
|
|
5480
|
+
json: $i,
|
|
5481
|
+
tags: yi,
|
|
5482
|
+
string_array: fa,
|
|
5483
|
+
int_array: ma,
|
|
5484
|
+
uuid_array: fa,
|
|
5485
|
+
multilang: ta,
|
|
5486
|
+
multilang_text: ra,
|
|
5487
|
+
structure: ia,
|
|
5488
|
+
secret: ca,
|
|
5489
|
+
password: ua
|
|
5436
5490
|
};
|
|
5437
|
-
for (let e of
|
|
5438
|
-
function
|
|
5439
|
-
if (e.field.type === "json" && e.field.structure) return /* @__PURE__ */ v(
|
|
5491
|
+
for (let e of _i) if (!Ts[e]) throw Error(`editRegistry: missing entry for FieldType "${e}". The TS union (types/fieldType.ts) and editRegistry must stay in sync with golang/internal/engine/types.go.`);
|
|
5492
|
+
function Es(e) {
|
|
5493
|
+
if (e.field.type === "json" && e.field.structure) return /* @__PURE__ */ v(ia, { ...e });
|
|
5440
5494
|
if (e.mode === "edit") {
|
|
5441
|
-
let t =
|
|
5495
|
+
let t = Ts[e.field.type];
|
|
5442
5496
|
if (!t) throw Error(`renderField: no edit-mode renderer for FieldType "${e.field.type}" (field "${e.fieldName}"). editRegistry must be total over FieldType; check types/fieldType.ts and components/fields/index.tsx.`);
|
|
5443
5497
|
return /* @__PURE__ */ v(t, { ...e });
|
|
5444
5498
|
}
|
|
5445
5499
|
if (!e.field.display?.widget) throw Error(`renderField: display mode requires a non-empty field.display.widget (field "${e.fieldName}", type "${e.field.type}"). The engine must stamp a smart default; an empty widget here means the field bypassed ResolveDefaultWidgets.`);
|
|
5446
|
-
return
|
|
5500
|
+
return ws({
|
|
5447
5501
|
field: e.field,
|
|
5448
5502
|
fieldName: e.fieldName,
|
|
5449
5503
|
surface: e.surface ?? "detail",
|
|
@@ -5456,98 +5510,98 @@ function ys(e) {
|
|
|
5456
5510
|
}
|
|
5457
5511
|
//#endregion
|
|
5458
5512
|
//#region src/hooks/useUserLocale.ts
|
|
5459
|
-
var
|
|
5460
|
-
function
|
|
5513
|
+
var Ds = "en";
|
|
5514
|
+
function Os() {
|
|
5461
5515
|
if (typeof navigator > "u") return;
|
|
5462
5516
|
let e = navigator.language;
|
|
5463
5517
|
if (e) return e.split("-")[0] || void 0;
|
|
5464
5518
|
}
|
|
5465
|
-
function
|
|
5519
|
+
function ks() {
|
|
5466
5520
|
let e = zn((e) => e.user), { data: t } = J(), n = e?.language;
|
|
5467
5521
|
if (n && n.trim()) return n;
|
|
5468
5522
|
let r = t?.languages?.[0]?.code;
|
|
5469
|
-
return r && r.trim() ? r :
|
|
5523
|
+
return r && r.trim() ? r : Os() || Ds;
|
|
5470
5524
|
}
|
|
5471
5525
|
//#endregion
|
|
5472
5526
|
//#region src/lib/field-regions.ts
|
|
5473
|
-
var
|
|
5474
|
-
function
|
|
5475
|
-
return
|
|
5476
|
-
|
|
5527
|
+
var As = /* @__PURE__ */ new Map();
|
|
5528
|
+
function js(e, t) {
|
|
5529
|
+
return As.set(e, t), () => {
|
|
5530
|
+
As.get(e) === t && As.delete(e);
|
|
5477
5531
|
};
|
|
5478
5532
|
}
|
|
5479
|
-
function
|
|
5480
|
-
return
|
|
5533
|
+
function Ms(e) {
|
|
5534
|
+
return As.get(e);
|
|
5481
5535
|
}
|
|
5482
5536
|
//#endregion
|
|
5483
5537
|
//#region src/lib/ui-actions.ts
|
|
5484
|
-
var
|
|
5485
|
-
function
|
|
5486
|
-
let n = e.match(
|
|
5538
|
+
var Ns = /\$\{\s*([^}]+?)\s*\}/g, Ps = /^\s*\$\{\s*([^}]+?)\s*\}\s*$/, Fs = Symbol("unresolved");
|
|
5539
|
+
function Is(e, t) {
|
|
5540
|
+
let n = e.match(Ps);
|
|
5487
5541
|
if (n) {
|
|
5488
|
-
let r =
|
|
5489
|
-
return r ===
|
|
5542
|
+
let r = Ls(n[1], t);
|
|
5543
|
+
return r === Fs ? e : r;
|
|
5490
5544
|
}
|
|
5491
|
-
return e.replace(
|
|
5492
|
-
let r =
|
|
5493
|
-
return r ===
|
|
5545
|
+
return e.replace(Ns, (e, n) => {
|
|
5546
|
+
let r = Ls(n, t);
|
|
5547
|
+
return r === Fs ? e : F(r);
|
|
5494
5548
|
});
|
|
5495
5549
|
}
|
|
5496
|
-
function
|
|
5497
|
-
if (e === "now") return
|
|
5550
|
+
function Ls(e, t) {
|
|
5551
|
+
if (e === "now") return Ei();
|
|
5498
5552
|
let [n, ...r] = e.split(".");
|
|
5499
|
-
if (n === "row") return !t.row || r.length === 0 ?
|
|
5553
|
+
if (n === "row") return !t.row || r.length === 0 ? Fs : Rs(t.row, r);
|
|
5500
5554
|
if (n === "field" && r.length >= 2) {
|
|
5501
|
-
let [e, t] = r, n =
|
|
5502
|
-
return n ? n.getField(t) :
|
|
5555
|
+
let [e, t] = r, n = Ms(e);
|
|
5556
|
+
return n ? n.getField(t) : Fs;
|
|
5503
5557
|
}
|
|
5504
|
-
return n === "params" ? !t.params || r.length === 0 ?
|
|
5558
|
+
return n === "params" ? !t.params || r.length === 0 ? Fs : Rs(t.params, r) : Fs;
|
|
5505
5559
|
}
|
|
5506
|
-
function
|
|
5560
|
+
function Rs(e, t) {
|
|
5507
5561
|
return t.reduce((e, t) => {
|
|
5508
5562
|
if (e && typeof e == "object") return e[t];
|
|
5509
5563
|
}, e);
|
|
5510
5564
|
}
|
|
5511
|
-
async function
|
|
5565
|
+
async function zs(e, t) {
|
|
5512
5566
|
for (let n of e) try {
|
|
5513
|
-
await
|
|
5567
|
+
await Bs(n, t);
|
|
5514
5568
|
} catch (e) {
|
|
5515
5569
|
let t = e instanceof Error ? e.message : String(e);
|
|
5516
5570
|
Z.error(`ui_step failed: ${t}`);
|
|
5517
5571
|
return;
|
|
5518
5572
|
}
|
|
5519
5573
|
}
|
|
5520
|
-
async function
|
|
5574
|
+
async function Bs(e, t) {
|
|
5521
5575
|
if (e.copy_to_clipboard != null) {
|
|
5522
|
-
let n =
|
|
5576
|
+
let n = Hs(e.copy_to_clipboard, t);
|
|
5523
5577
|
await navigator.clipboard.writeText(n);
|
|
5524
5578
|
return;
|
|
5525
5579
|
}
|
|
5526
5580
|
if (e.set_field) {
|
|
5527
|
-
let { target: n, value: r } = e.set_field, { region: i, field: a } =
|
|
5581
|
+
let { target: n, value: r } = e.set_field, { region: i, field: a } = Us(n), o = Ms(i);
|
|
5528
5582
|
if (!o) throw Error(`region "${i}" not registered`);
|
|
5529
|
-
o.setField(a,
|
|
5583
|
+
o.setField(a, Vs(r, t));
|
|
5530
5584
|
return;
|
|
5531
5585
|
}
|
|
5532
5586
|
if (e.focus_field) {
|
|
5533
|
-
let { region: t, field: n } =
|
|
5587
|
+
let { region: t, field: n } = Us(e.focus_field), r = Ms(t);
|
|
5534
5588
|
if (!r) throw Error(`region "${t}" not registered`);
|
|
5535
5589
|
r.focusField(n);
|
|
5536
5590
|
return;
|
|
5537
5591
|
}
|
|
5538
5592
|
if (e.show_toast) {
|
|
5539
|
-
let n =
|
|
5593
|
+
let n = Hs(e.show_toast.message, t), r = e.show_toast.kind ?? "info";
|
|
5540
5594
|
r === "success" ? Z.success(n) : r === "error" ? Z.error(n) : Z.info(n);
|
|
5541
5595
|
return;
|
|
5542
5596
|
}
|
|
5543
5597
|
}
|
|
5544
|
-
function
|
|
5545
|
-
return typeof e == "string" ?
|
|
5598
|
+
function Vs(e, t) {
|
|
5599
|
+
return typeof e == "string" ? Is(e, t) : e;
|
|
5546
5600
|
}
|
|
5547
|
-
function
|
|
5548
|
-
return F(
|
|
5601
|
+
function Hs(e, t) {
|
|
5602
|
+
return F(Is(e, t));
|
|
5549
5603
|
}
|
|
5550
|
-
function
|
|
5604
|
+
function Us(e) {
|
|
5551
5605
|
let t = e.indexOf(".");
|
|
5552
5606
|
if (t <= 0) throw Error(`invalid path "${e}" (expected "region.field")`);
|
|
5553
5607
|
return {
|
|
@@ -5555,12 +5609,12 @@ function Is(e) {
|
|
|
5555
5609
|
field: e.slice(t + 1)
|
|
5556
5610
|
};
|
|
5557
5611
|
}
|
|
5558
|
-
function
|
|
5612
|
+
function Ws(e) {
|
|
5559
5613
|
return !e.handler && !!e.ui_steps && e.ui_steps.length > 0;
|
|
5560
5614
|
}
|
|
5561
5615
|
//#endregion
|
|
5562
5616
|
//#region src/lib/mass-edit.ts
|
|
5563
|
-
function
|
|
5617
|
+
function Gs(e) {
|
|
5564
5618
|
if (!e) return [];
|
|
5565
5619
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
5566
5620
|
for (let r of e.split(",")) {
|
|
@@ -5569,17 +5623,17 @@ function Rs(e) {
|
|
|
5569
5623
|
}
|
|
5570
5624
|
return n;
|
|
5571
5625
|
}
|
|
5572
|
-
function
|
|
5626
|
+
function Ks(e, t) {
|
|
5573
5627
|
if (!e || !Ke(e, "update")) return [];
|
|
5574
|
-
let n = Array.isArray(t) ? t :
|
|
5628
|
+
let n = Array.isArray(t) ? t : Gs(t), r = n.length > 0 ? new Set(n) : null, i = rt(e), a = new Set(R(e)), o = r ? n : qs(e, i, a), s = [];
|
|
5575
5629
|
for (let t of o) {
|
|
5576
5630
|
if (r && !r.has(t)) continue;
|
|
5577
|
-
let n =
|
|
5631
|
+
let n = Js(e, t, i, a);
|
|
5578
5632
|
n && s.push(n);
|
|
5579
5633
|
}
|
|
5580
5634
|
return s;
|
|
5581
5635
|
}
|
|
5582
|
-
function
|
|
5636
|
+
function qs(e, t, n) {
|
|
5583
5637
|
let r = [];
|
|
5584
5638
|
for (let [t, i] of e.fields) n.has(t) || i.auto || r.push(t);
|
|
5585
5639
|
if (!t) {
|
|
@@ -5588,7 +5642,7 @@ function Bs(e, t, n) {
|
|
|
5588
5642
|
}
|
|
5589
5643
|
return r;
|
|
5590
5644
|
}
|
|
5591
|
-
function
|
|
5645
|
+
function Js(e, t, n, r) {
|
|
5592
5646
|
if (t.startsWith("$status.")) {
|
|
5593
5647
|
if (n) return null;
|
|
5594
5648
|
let r = t.slice(8), i = e.status_groups?.[r];
|
|
@@ -5596,7 +5650,7 @@ function Vs(e, t, n, r) {
|
|
|
5596
5650
|
code: t,
|
|
5597
5651
|
bare: r,
|
|
5598
5652
|
kind: "status",
|
|
5599
|
-
label:
|
|
5653
|
+
label: Ys(i.name, r),
|
|
5600
5654
|
statusGroup: i
|
|
5601
5655
|
} : null;
|
|
5602
5656
|
}
|
|
@@ -5607,7 +5661,7 @@ function Vs(e, t, n, r) {
|
|
|
5607
5661
|
code: t,
|
|
5608
5662
|
bare: r,
|
|
5609
5663
|
kind: "property",
|
|
5610
|
-
label:
|
|
5664
|
+
label: Ys(i.name, r),
|
|
5611
5665
|
property: i
|
|
5612
5666
|
} : null;
|
|
5613
5667
|
}
|
|
@@ -5617,18 +5671,18 @@ function Vs(e, t, n, r) {
|
|
|
5617
5671
|
code: t,
|
|
5618
5672
|
bare: t,
|
|
5619
5673
|
kind: "field",
|
|
5620
|
-
label:
|
|
5674
|
+
label: Ys(i.display?.name, t),
|
|
5621
5675
|
field: i
|
|
5622
5676
|
};
|
|
5623
5677
|
}
|
|
5624
|
-
function
|
|
5678
|
+
function Ys(e, t) {
|
|
5625
5679
|
return e && I(e) || t;
|
|
5626
5680
|
}
|
|
5627
5681
|
//#endregion
|
|
5628
5682
|
//#region src/components/mass-edit/PropertyGridEditor.tsx
|
|
5629
|
-
var
|
|
5630
|
-
function
|
|
5631
|
-
let a = u(() =>
|
|
5683
|
+
var Xs = Symbol.for("declarion.mass-edit.multiple");
|
|
5684
|
+
function Zs({ entity: e, filterTargets: t, selectedRows: n, value: r, onChange: i }) {
|
|
5685
|
+
let a = u(() => Ks(e, t), [e, t]), s = u(() => Object.keys(r).map((e) => {
|
|
5632
5686
|
let t = a.find((t) => t.code === e);
|
|
5633
5687
|
return t ? {
|
|
5634
5688
|
target: t,
|
|
@@ -5638,8 +5692,8 @@ function Ws({ entity: e, filterTargets: t, selectedRows: n, value: r, onChange:
|
|
|
5638
5692
|
let e = new Set(s.map((e) => e.target.code));
|
|
5639
5693
|
return a.filter((t) => !e.has(t.code));
|
|
5640
5694
|
}, [s, a]), l = o((e) => {
|
|
5641
|
-
let t =
|
|
5642
|
-
a[e.code] = t ===
|
|
5695
|
+
let t = nc(e, n), a = { ...r };
|
|
5696
|
+
a[e.code] = t === Xs ? void 0 : t, i(a);
|
|
5643
5697
|
}, [
|
|
5644
5698
|
r,
|
|
5645
5699
|
n,
|
|
@@ -5667,12 +5721,12 @@ function Ws({ entity: e, filterTargets: t, selectedRows: n, value: r, onChange:
|
|
|
5667
5721
|
},
|
|
5668
5722
|
children: "No targets selected. Add a field, status, or property to edit across all selected rows."
|
|
5669
5723
|
}),
|
|
5670
|
-
s.map((e) => /* @__PURE__ */ v(
|
|
5724
|
+
s.map((e) => /* @__PURE__ */ v(Qs, {
|
|
5671
5725
|
row: e,
|
|
5672
5726
|
onChange: (t) => d(e.target.code, t),
|
|
5673
5727
|
onRemove: () => f(e.target.code)
|
|
5674
5728
|
}, e.target.code)),
|
|
5675
|
-
/* @__PURE__ */ v(
|
|
5729
|
+
/* @__PURE__ */ v(tc, {
|
|
5676
5730
|
targets: c,
|
|
5677
5731
|
onPick: l
|
|
5678
5732
|
})
|
|
@@ -5685,7 +5739,7 @@ function Ws({ entity: e, filterTargets: t, selectedRows: n, value: r, onChange:
|
|
|
5685
5739
|
children: "Entity schema unavailable. Mass edit requires an entity-bound action."
|
|
5686
5740
|
});
|
|
5687
5741
|
}
|
|
5688
|
-
function
|
|
5742
|
+
function Qs({ row: t, onChange: n, onRemove: r }) {
|
|
5689
5743
|
let { target: i } = t;
|
|
5690
5744
|
return /* @__PURE__ */ y("div", {
|
|
5691
5745
|
"data-testid": "mass-edit-row",
|
|
@@ -5704,7 +5758,7 @@ function Gs({ row: t, onChange: n, onRemove: r }) {
|
|
|
5704
5758
|
title: i.code,
|
|
5705
5759
|
children: i.label
|
|
5706
5760
|
}),
|
|
5707
|
-
/* @__PURE__ */ v(
|
|
5761
|
+
/* @__PURE__ */ v($s, {
|
|
5708
5762
|
row: t,
|
|
5709
5763
|
onChange: n
|
|
5710
5764
|
}),
|
|
@@ -5716,8 +5770,8 @@ function Gs({ row: t, onChange: n, onRemove: r }) {
|
|
|
5716
5770
|
]
|
|
5717
5771
|
});
|
|
5718
5772
|
}
|
|
5719
|
-
function
|
|
5720
|
-
let { target: n } = e, r =
|
|
5773
|
+
function $s({ row: e, onChange: t }) {
|
|
5774
|
+
let { target: n } = e, r = ks(), i = e.value === Xs, a = i ? "<multiple values>" : void 0, o = i ? "" : e.value;
|
|
5721
5775
|
if (n.kind === "status" && n.statusGroup) {
|
|
5722
5776
|
let e = n.statusGroup.statuses.map((e) => ({
|
|
5723
5777
|
value: e.code,
|
|
@@ -5733,11 +5787,11 @@ function Ks({ row: e, onChange: t }) {
|
|
|
5733
5787
|
})
|
|
5734
5788
|
});
|
|
5735
5789
|
}
|
|
5736
|
-
let s =
|
|
5790
|
+
let s = ec(n);
|
|
5737
5791
|
return /* @__PURE__ */ y("div", {
|
|
5738
5792
|
"data-testid": `value-${n.code}`,
|
|
5739
5793
|
style: { position: "relative" },
|
|
5740
|
-
children: [
|
|
5794
|
+
children: [Es({
|
|
5741
5795
|
field: s,
|
|
5742
5796
|
fieldName: n.bare,
|
|
5743
5797
|
value: o ?? "",
|
|
@@ -5756,7 +5810,7 @@ function Ks({ row: e, onChange: t }) {
|
|
|
5756
5810
|
})]
|
|
5757
5811
|
});
|
|
5758
5812
|
}
|
|
5759
|
-
function
|
|
5813
|
+
function ec(e) {
|
|
5760
5814
|
if (e.kind === "field" && e.field) return e.field;
|
|
5761
5815
|
if (e.kind === "property" && e.property) {
|
|
5762
5816
|
let t = e.property;
|
|
@@ -5771,7 +5825,7 @@ function qs(e) {
|
|
|
5771
5825
|
}
|
|
5772
5826
|
return { type: "string" };
|
|
5773
5827
|
}
|
|
5774
|
-
function
|
|
5828
|
+
function tc({ targets: t, onPick: n }) {
|
|
5775
5829
|
let [r, i] = f(!1);
|
|
5776
5830
|
return t.length === 0 ? null : r ? /* @__PURE__ */ v("div", {
|
|
5777
5831
|
"data-testid": "mass-edit-target-picker",
|
|
@@ -5798,7 +5852,7 @@ function Js({ targets: t, onPick: n }) {
|
|
|
5798
5852
|
children: [/* @__PURE__ */ v(e.plus, { size: 12 }), " Add target"]
|
|
5799
5853
|
});
|
|
5800
5854
|
}
|
|
5801
|
-
function
|
|
5855
|
+
function nc(e, t) {
|
|
5802
5856
|
if (!t || t.length === 0 || e.kind !== "field") return;
|
|
5803
5857
|
let n, r = !1;
|
|
5804
5858
|
for (let i of t) {
|
|
@@ -5807,21 +5861,21 @@ function Ys(e, t) {
|
|
|
5807
5861
|
n = t, r = !0;
|
|
5808
5862
|
continue;
|
|
5809
5863
|
}
|
|
5810
|
-
if (n !== t) return
|
|
5864
|
+
if (n !== t) return Xs;
|
|
5811
5865
|
}
|
|
5812
5866
|
return n;
|
|
5813
5867
|
}
|
|
5814
5868
|
//#endregion
|
|
5815
5869
|
//#region src/components/shared/ActionDialog.tsx
|
|
5816
|
-
var
|
|
5817
|
-
function
|
|
5870
|
+
var rc = /^\$row\.([a-zA-Z_][a-zA-Z0-9_]*)$/;
|
|
5871
|
+
function ic(e, t) {
|
|
5818
5872
|
if (typeof e != "string") return e ?? "";
|
|
5819
|
-
let n = e.match(
|
|
5873
|
+
let n = e.match(rc);
|
|
5820
5874
|
if (!n) return e;
|
|
5821
5875
|
let r = n[1];
|
|
5822
5876
|
return t && r in t ? t[r] ?? "" : (typeof console < "u" && console.warn && console.warn(`ActionDialog: prefill template ${e} could not be resolved; row missing or has no field '${r}'`), "");
|
|
5823
5877
|
}
|
|
5824
|
-
function
|
|
5878
|
+
function ac(e) {
|
|
5825
5879
|
return {
|
|
5826
5880
|
type: e.type ?? "string",
|
|
5827
5881
|
required: e.required,
|
|
@@ -5834,18 +5888,18 @@ function Qs(e) {
|
|
|
5834
5888
|
ref: Ue(e.ref)
|
|
5835
5889
|
};
|
|
5836
5890
|
}
|
|
5837
|
-
function
|
|
5891
|
+
function oc(e, t) {
|
|
5838
5892
|
if (!e.includes("${")) return e;
|
|
5839
|
-
let n =
|
|
5893
|
+
let n = Is(e, { params: t });
|
|
5840
5894
|
return n == null ? "" : F(n);
|
|
5841
5895
|
}
|
|
5842
|
-
var
|
|
5843
|
-
function
|
|
5896
|
+
var sc = /\$\{\s*([^}]+?)\s*\}/g;
|
|
5897
|
+
function cc(e, t) {
|
|
5844
5898
|
let n = `params.${t}`;
|
|
5845
|
-
for (let t of e.matchAll(
|
|
5899
|
+
for (let t of e.matchAll(sc)) if (t[1] === n) return !0;
|
|
5846
5900
|
return !1;
|
|
5847
5901
|
}
|
|
5848
|
-
function
|
|
5902
|
+
function lc({ param: e, value: t, onChange: n, statusGroups: r }) {
|
|
5849
5903
|
let i = u(() => {
|
|
5850
5904
|
let t = r ? Object.entries(r) : [];
|
|
5851
5905
|
return [{
|
|
@@ -5863,12 +5917,12 @@ function nc({ param: e, value: t, onChange: n, statusGroups: r }) {
|
|
|
5863
5917
|
placeholder: "Select status group…"
|
|
5864
5918
|
});
|
|
5865
5919
|
}
|
|
5866
|
-
function
|
|
5920
|
+
function uc({ param: e, value: t, onChange: n, statusGroups: r, formData: i }) {
|
|
5867
5921
|
let a = u(() => {
|
|
5868
5922
|
if (!r) return [];
|
|
5869
5923
|
let t = e.filter?.status_group;
|
|
5870
5924
|
if (t) {
|
|
5871
|
-
let e =
|
|
5925
|
+
let e = oc(t, i);
|
|
5872
5926
|
return e && r[e] ? r[e].statuses : [];
|
|
5873
5927
|
}
|
|
5874
5928
|
return Object.values(r).flatMap((e) => e.statuses);
|
|
@@ -5890,8 +5944,8 @@ function rc({ param: e, value: t, onChange: n, statusGroups: r, formData: i }) {
|
|
|
5890
5944
|
placeholder: "Select status…"
|
|
5891
5945
|
});
|
|
5892
5946
|
}
|
|
5893
|
-
function
|
|
5894
|
-
let { data: d } = J(), p =
|
|
5947
|
+
function dc({ open: t, onOpenChange: n, action: r, actionName: i, onSubmit: a, isPending: s, row: c, bulkSelection: l }) {
|
|
5948
|
+
let { data: d } = J(), p = ks(), m = r.resolved_params, h = r.resolved_hidden_defaults ?? {}, g = u(() => m ? Array.from(m) : [], [m]), b = u(() => {
|
|
5895
5949
|
if (!(!r.entity || !d)) return d.entities[r.entity]?.status_groups;
|
|
5896
5950
|
}, [r.entity, d]), x = u(() => {
|
|
5897
5951
|
if (!(!r.entity || !d)) return d.entities[r.entity];
|
|
@@ -5915,7 +5969,7 @@ function ic({ open: t, onOpenChange: n, action: r, actionName: i, onSubmit: a, i
|
|
|
5915
5969
|
e[t] = n.default === !0 || n.default === "true";
|
|
5916
5970
|
continue;
|
|
5917
5971
|
}
|
|
5918
|
-
e[t] =
|
|
5972
|
+
e[t] = ic(n.default, c);
|
|
5919
5973
|
}
|
|
5920
5974
|
return e;
|
|
5921
5975
|
}, [
|
|
@@ -5933,7 +5987,7 @@ function ic({ open: t, onOpenChange: n, action: r, actionName: i, onSubmit: a, i
|
|
|
5933
5987
|
for (let [t, n] of m) {
|
|
5934
5988
|
if (n.type !== "status") continue;
|
|
5935
5989
|
let i = n.filter?.status_group;
|
|
5936
|
-
i &&
|
|
5990
|
+
i && cc(i, e) && (r[t] = "");
|
|
5937
5991
|
}
|
|
5938
5992
|
return r;
|
|
5939
5993
|
});
|
|
@@ -6046,26 +6100,26 @@ function ic({ open: t, onOpenChange: n, action: r, actionName: i, onSubmit: a, i
|
|
|
6046
6100
|
let n = I(t.display?.name) || e;
|
|
6047
6101
|
if (t.type === "id_array") return null;
|
|
6048
6102
|
let r;
|
|
6049
|
-
return r = t.type === "entity_patch" ? /* @__PURE__ */ v(
|
|
6103
|
+
return r = t.type === "entity_patch" ? /* @__PURE__ */ v(Zs, {
|
|
6050
6104
|
entity: x,
|
|
6051
6105
|
filterTargets: typeof t.filter?.targets == "string" ? t.filter.targets : void 0,
|
|
6052
6106
|
selectedRows: l,
|
|
6053
6107
|
value: C[e] ?? {},
|
|
6054
6108
|
onChange: (t) => D(e, t)
|
|
6055
|
-
}) : t.type === "status_group" ? /* @__PURE__ */ v(
|
|
6109
|
+
}) : t.type === "status_group" ? /* @__PURE__ */ v(lc, {
|
|
6056
6110
|
param: t,
|
|
6057
6111
|
value: C[e],
|
|
6058
6112
|
onChange: (t) => D(e, t),
|
|
6059
6113
|
statusGroups: b,
|
|
6060
6114
|
formData: C
|
|
6061
|
-
}) : t.type === "status" ? /* @__PURE__ */ v(
|
|
6115
|
+
}) : t.type === "status" ? /* @__PURE__ */ v(uc, {
|
|
6062
6116
|
param: t,
|
|
6063
6117
|
value: C[e],
|
|
6064
6118
|
onChange: (t) => D(e, t),
|
|
6065
6119
|
statusGroups: b,
|
|
6066
6120
|
formData: C
|
|
6067
|
-
}) :
|
|
6068
|
-
field:
|
|
6121
|
+
}) : Es({
|
|
6122
|
+
field: ac(t),
|
|
6069
6123
|
fieldName: e,
|
|
6070
6124
|
value: C[e],
|
|
6071
6125
|
mode: "edit",
|
|
@@ -6125,7 +6179,7 @@ function ic({ open: t, onOpenChange: n, action: r, actionName: i, onSubmit: a, i
|
|
|
6125
6179
|
}
|
|
6126
6180
|
//#endregion
|
|
6127
6181
|
//#region src/components/shared/ActionResultDialog.tsx
|
|
6128
|
-
function
|
|
6182
|
+
function fc({ open: t, onClose: n, display: r }) {
|
|
6129
6183
|
let i = d(null);
|
|
6130
6184
|
return c(() => {
|
|
6131
6185
|
t && i.current?.focus();
|
|
@@ -6220,7 +6274,7 @@ function ac({ open: t, onClose: n, display: r }) {
|
|
|
6220
6274
|
gap: 12,
|
|
6221
6275
|
overflowY: "auto"
|
|
6222
6276
|
},
|
|
6223
|
-
children: r.fields.map((e, t) => /* @__PURE__ */ v(
|
|
6277
|
+
children: r.fields.map((e, t) => /* @__PURE__ */ v(pc, { field: e }, t))
|
|
6224
6278
|
}),
|
|
6225
6279
|
/* @__PURE__ */ y("div", {
|
|
6226
6280
|
style: {
|
|
@@ -6243,51 +6297,108 @@ function ac({ open: t, onClose: n, display: r }) {
|
|
|
6243
6297
|
]
|
|
6244
6298
|
})] }) : null;
|
|
6245
6299
|
}
|
|
6246
|
-
function
|
|
6300
|
+
function pc({ field: t }) {
|
|
6301
|
+
let n = t.href ?? t.download_url ?? t.value, r = t.type === "download", i = r || t.type === "link", a = n ? fi(n) : void 0, [o, s] = f(!1), [c, l] = f(null);
|
|
6302
|
+
async function u() {
|
|
6303
|
+
if (a) {
|
|
6304
|
+
s(!0), l(null);
|
|
6305
|
+
try {
|
|
6306
|
+
await hi(a, t.filename);
|
|
6307
|
+
} catch (e) {
|
|
6308
|
+
l(e instanceof Error ? e.message : String(e));
|
|
6309
|
+
} finally {
|
|
6310
|
+
s(!1);
|
|
6311
|
+
}
|
|
6312
|
+
}
|
|
6313
|
+
}
|
|
6314
|
+
let d = {
|
|
6315
|
+
display: "inline-flex",
|
|
6316
|
+
alignItems: "center",
|
|
6317
|
+
justifyContent: "center",
|
|
6318
|
+
gap: 6,
|
|
6319
|
+
height: 32,
|
|
6320
|
+
width: "fit-content",
|
|
6321
|
+
maxWidth: "100%",
|
|
6322
|
+
padding: "0 12px",
|
|
6323
|
+
borderRadius: 6,
|
|
6324
|
+
border: "1px solid var(--border)",
|
|
6325
|
+
background: r ? "var(--accent)" : "var(--surface)",
|
|
6326
|
+
color: r ? "var(--primary-fg)" : "var(--text)",
|
|
6327
|
+
fontSize: 12.5,
|
|
6328
|
+
fontWeight: 500,
|
|
6329
|
+
textDecoration: "none",
|
|
6330
|
+
whiteSpace: "nowrap"
|
|
6331
|
+
};
|
|
6247
6332
|
return /* @__PURE__ */ y("div", {
|
|
6248
6333
|
style: {
|
|
6249
6334
|
display: "flex",
|
|
6250
6335
|
flexDirection: "column",
|
|
6251
6336
|
gap: 4
|
|
6252
6337
|
},
|
|
6253
|
-
children: [
|
|
6254
|
-
|
|
6255
|
-
fontSize: 11.5,
|
|
6256
|
-
fontWeight: 500,
|
|
6257
|
-
color: "var(--text-3)"
|
|
6258
|
-
},
|
|
6259
|
-
children: e.label
|
|
6260
|
-
}), /* @__PURE__ */ y("div", {
|
|
6261
|
-
style: {
|
|
6262
|
-
position: "relative",
|
|
6263
|
-
width: "100%"
|
|
6264
|
-
},
|
|
6265
|
-
children: [/* @__PURE__ */ v("div", {
|
|
6266
|
-
className: e.monospace ? "mono" : void 0,
|
|
6338
|
+
children: [
|
|
6339
|
+
/* @__PURE__ */ v("div", {
|
|
6267
6340
|
style: {
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
padding: e.copyable ? "8px 40px 8px 10px" : "8px 10px",
|
|
6272
|
-
fontSize: 12.5,
|
|
6273
|
-
wordBreak: "break-all",
|
|
6274
|
-
color: "var(--text)"
|
|
6341
|
+
fontSize: 11.5,
|
|
6342
|
+
fontWeight: 500,
|
|
6343
|
+
color: "var(--text-3)"
|
|
6275
6344
|
},
|
|
6276
|
-
children:
|
|
6277
|
-
}),
|
|
6345
|
+
children: t.label
|
|
6346
|
+
}),
|
|
6347
|
+
i && a ? r ? /* @__PURE__ */ y("button", {
|
|
6348
|
+
type: "button",
|
|
6349
|
+
onClick: u,
|
|
6350
|
+
disabled: o,
|
|
6278
6351
|
style: {
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
right: 4
|
|
6352
|
+
...d,
|
|
6353
|
+
cursor: o ? "default" : "pointer"
|
|
6282
6354
|
},
|
|
6283
|
-
children: /* @__PURE__ */ v(
|
|
6284
|
-
})
|
|
6285
|
-
|
|
6355
|
+
children: [v(o ? e.loader : e.download, { size: 14 }), /* @__PURE__ */ v("span", { children: o ? "Downloading…" : "Download" })]
|
|
6356
|
+
}) : /* @__PURE__ */ y("a", {
|
|
6357
|
+
href: a,
|
|
6358
|
+
target: "_blank",
|
|
6359
|
+
rel: "noopener noreferrer",
|
|
6360
|
+
style: d,
|
|
6361
|
+
children: [/* @__PURE__ */ v(e.download, { size: 14 }), /* @__PURE__ */ v("span", { children: t.value })]
|
|
6362
|
+
}) : null,
|
|
6363
|
+
c && /* @__PURE__ */ v("div", {
|
|
6364
|
+
style: {
|
|
6365
|
+
fontSize: 11.5,
|
|
6366
|
+
color: "var(--danger)"
|
|
6367
|
+
},
|
|
6368
|
+
children: c
|
|
6369
|
+
}),
|
|
6370
|
+
/* @__PURE__ */ y("div", {
|
|
6371
|
+
style: {
|
|
6372
|
+
position: "relative",
|
|
6373
|
+
width: "100%"
|
|
6374
|
+
},
|
|
6375
|
+
children: [/* @__PURE__ */ v("div", {
|
|
6376
|
+
className: t.monospace ? "mono" : void 0,
|
|
6377
|
+
style: {
|
|
6378
|
+
borderRadius: 6,
|
|
6379
|
+
border: "1px solid var(--border)",
|
|
6380
|
+
background: "var(--surface-2)",
|
|
6381
|
+
padding: t.copyable ? "8px 40px 8px 10px" : "8px 10px",
|
|
6382
|
+
fontSize: 12.5,
|
|
6383
|
+
wordBreak: "break-all",
|
|
6384
|
+
color: "var(--text)"
|
|
6385
|
+
},
|
|
6386
|
+
children: t.value
|
|
6387
|
+
}), t.copyable && /* @__PURE__ */ v("div", {
|
|
6388
|
+
style: {
|
|
6389
|
+
position: "absolute",
|
|
6390
|
+
top: 4,
|
|
6391
|
+
right: 4
|
|
6392
|
+
},
|
|
6393
|
+
children: /* @__PURE__ */ v(vi, { value: t.value })
|
|
6394
|
+
})]
|
|
6395
|
+
})
|
|
6396
|
+
]
|
|
6286
6397
|
});
|
|
6287
6398
|
}
|
|
6288
6399
|
//#endregion
|
|
6289
6400
|
//#region src/components/shared/ActionRunner.tsx
|
|
6290
|
-
function
|
|
6401
|
+
function mc(e) {
|
|
6291
6402
|
if (!e || typeof e != "object") return { kind: "success" };
|
|
6292
6403
|
let t = e, n = t.status, r = t.success?.length ?? 0, i = t.errors?.length ?? 0, a = t.skipped?.length ?? 0, o = t.errors?.[0]?.error;
|
|
6293
6404
|
if (n === "partial") {
|
|
@@ -6302,19 +6413,32 @@ function sc(e) {
|
|
|
6302
6413
|
detail: "No items matched"
|
|
6303
6414
|
} : n === "accepted" ? { kind: "accepted" } : { kind: "success" };
|
|
6304
6415
|
}
|
|
6305
|
-
function
|
|
6416
|
+
function hc(e) {
|
|
6306
6417
|
if (!e || typeof e != "object") return null;
|
|
6307
6418
|
let t = e.result;
|
|
6308
6419
|
if (!t || typeof t != "object") return null;
|
|
6309
6420
|
let n = t.$display;
|
|
6310
6421
|
return !n || typeof n != "object" ? null : n;
|
|
6311
6422
|
}
|
|
6312
|
-
function
|
|
6423
|
+
function gc(e) {
|
|
6424
|
+
let t = hc(e)?.fields;
|
|
6425
|
+
if (!Array.isArray(t)) return null;
|
|
6426
|
+
for (let e of t) {
|
|
6427
|
+
if (e?.type !== "download") continue;
|
|
6428
|
+
let t = e.href ?? e.download_url ?? e.value;
|
|
6429
|
+
if (typeof t == "string" && t !== "" && fi(t)) return {
|
|
6430
|
+
url: t,
|
|
6431
|
+
filename: typeof e.filename == "string" ? e.filename : void 0
|
|
6432
|
+
};
|
|
6433
|
+
}
|
|
6434
|
+
return null;
|
|
6435
|
+
}
|
|
6436
|
+
function _c(e) {
|
|
6313
6437
|
if (!e || typeof e != "object") return;
|
|
6314
6438
|
let t = e.result;
|
|
6315
6439
|
!t || typeof t != "object" || "impersonation_session_id" in t && window.location.assign("/");
|
|
6316
6440
|
}
|
|
6317
|
-
function
|
|
6441
|
+
function vc(e) {
|
|
6318
6442
|
if (e instanceof Yn) {
|
|
6319
6443
|
let t = e.response.errors ?? [];
|
|
6320
6444
|
if (t.length === 1) return {
|
|
@@ -6335,32 +6459,41 @@ function uc(e) {
|
|
|
6335
6459
|
detail: e instanceof Error ? e.message : String(e)
|
|
6336
6460
|
};
|
|
6337
6461
|
}
|
|
6338
|
-
var
|
|
6339
|
-
function
|
|
6340
|
-
let e = s(
|
|
6462
|
+
var yc = r(null);
|
|
6463
|
+
function bc() {
|
|
6464
|
+
let e = s(yc);
|
|
6341
6465
|
if (!e) throw Error("useActionRunner must be used within <ActionRunnerProvider>");
|
|
6342
6466
|
return e;
|
|
6343
6467
|
}
|
|
6344
|
-
function
|
|
6468
|
+
function xc(e) {
|
|
6345
6469
|
let t = {}, n = e.action?.resolved_hidden_defaults;
|
|
6346
6470
|
if (n) for (let [e, r] of Object.entries(n)) r !== void 0 && (t[e] = r);
|
|
6347
6471
|
return t;
|
|
6348
6472
|
}
|
|
6349
|
-
function
|
|
6473
|
+
function Sc({ children: e }) {
|
|
6350
6474
|
let t = qr(), { data: n } = J(), [r, i] = f(null), [a, s] = f(0), [c, l] = f(null), d = o((e) => {
|
|
6351
6475
|
if (e?.progress_screen) return n?.screens[e.progress_screen]?.route;
|
|
6352
6476
|
}, [n?.screens]), p = o((e, n, r, i, a) => {
|
|
6353
6477
|
let o = () => {
|
|
6354
|
-
let n =
|
|
6478
|
+
let n = Cc(a), i = d(r), o = n ? `Job ${n} queued` : "Running in background";
|
|
6355
6479
|
Z.success(`${e} started`, o, i ? { action: {
|
|
6356
6480
|
label: "View",
|
|
6357
6481
|
onClick: () => t(i)
|
|
6358
6482
|
} } : void 0);
|
|
6359
6483
|
};
|
|
6360
6484
|
switch (i.kind) {
|
|
6361
|
-
case "success":
|
|
6362
|
-
|
|
6485
|
+
case "success": {
|
|
6486
|
+
let t = gc(a), r = t ? { action: {
|
|
6487
|
+
label: "Download",
|
|
6488
|
+
onClick: () => {
|
|
6489
|
+
hi(t.url, t.filename).catch((e) => {
|
|
6490
|
+
Z.error("Download failed", e instanceof Error ? e.message : String(e));
|
|
6491
|
+
});
|
|
6492
|
+
}
|
|
6493
|
+
} } : void 0;
|
|
6494
|
+
n ? o() : Z.success(`${e} complete`, void 0, r);
|
|
6363
6495
|
return;
|
|
6496
|
+
}
|
|
6364
6497
|
case "accepted":
|
|
6365
6498
|
o();
|
|
6366
6499
|
return;
|
|
@@ -6391,18 +6524,18 @@ function mc({ children: e }) {
|
|
|
6391
6524
|
}), Promise.resolve()) : (async (n) => {
|
|
6392
6525
|
s((e) => e + 1);
|
|
6393
6526
|
try {
|
|
6394
|
-
let i = await e.execute(n), o =
|
|
6527
|
+
let i = await e.execute(n), o = mc(i);
|
|
6395
6528
|
if (p(a, r, t, o, i), o.kind === "success" || o.kind === "accepted") {
|
|
6396
6529
|
e.onSuccess?.(i);
|
|
6397
|
-
let t =
|
|
6398
|
-
t && l(t),
|
|
6530
|
+
let t = hc(i);
|
|
6531
|
+
t && l(t), _c(i);
|
|
6399
6532
|
}
|
|
6400
6533
|
} catch (e) {
|
|
6401
|
-
p(a, r, t,
|
|
6534
|
+
p(a, r, t, vc(e));
|
|
6402
6535
|
} finally {
|
|
6403
6536
|
s((e) => Math.max(0, e - 1));
|
|
6404
6537
|
}
|
|
6405
|
-
})(
|
|
6538
|
+
})(xc(e));
|
|
6406
6539
|
}, [p]), h = a > 0 || !!r?.pending, g = u(() => ({
|
|
6407
6540
|
run: m,
|
|
6408
6541
|
isRunning: h
|
|
@@ -6414,15 +6547,15 @@ function mc({ children: e }) {
|
|
|
6414
6547
|
pending: !0
|
|
6415
6548
|
} : e), s((e) => e + 1);
|
|
6416
6549
|
try {
|
|
6417
|
-
let r = await n.opts.execute(e), s =
|
|
6550
|
+
let r = await n.opts.execute(e), s = mc(r);
|
|
6418
6551
|
if (p(n.title, o, a, s, r), s.kind === "success" || s.kind === "accepted") {
|
|
6419
6552
|
n.opts.onSuccess?.(r);
|
|
6420
|
-
let e =
|
|
6421
|
-
e && l(e),
|
|
6553
|
+
let e = hc(r);
|
|
6554
|
+
e && l(e), _c(r);
|
|
6422
6555
|
}
|
|
6423
6556
|
s.kind !== "partial" && i((e) => e?.id === t ? null : e);
|
|
6424
6557
|
} catch (e) {
|
|
6425
|
-
p(n.title, o, a,
|
|
6558
|
+
p(n.title, o, a, vc(e));
|
|
6426
6559
|
} finally {
|
|
6427
6560
|
s((e) => Math.max(0, e - 1)), i((e) => e?.id === t ? {
|
|
6428
6561
|
...e,
|
|
@@ -6430,16 +6563,16 @@ function mc({ children: e }) {
|
|
|
6430
6563
|
} : e);
|
|
6431
6564
|
}
|
|
6432
6565
|
}, [r, p]);
|
|
6433
|
-
return /* @__PURE__ */ y(
|
|
6566
|
+
return /* @__PURE__ */ y(yc.Provider, {
|
|
6434
6567
|
value: g,
|
|
6435
6568
|
children: [
|
|
6436
6569
|
e,
|
|
6437
|
-
c && /* @__PURE__ */ v(
|
|
6570
|
+
c && /* @__PURE__ */ v(fc, {
|
|
6438
6571
|
open: !0,
|
|
6439
6572
|
onClose: () => l(null),
|
|
6440
6573
|
display: c
|
|
6441
6574
|
}),
|
|
6442
|
-
r?.kind === "params" && _ && /* @__PURE__ */ v(
|
|
6575
|
+
r?.kind === "params" && _ && /* @__PURE__ */ v(dc, {
|
|
6443
6576
|
open: !0,
|
|
6444
6577
|
onOpenChange: (e) => {
|
|
6445
6578
|
e || i(null);
|
|
@@ -6450,22 +6583,22 @@ function mc({ children: e }) {
|
|
|
6450
6583
|
isPending: r.pending,
|
|
6451
6584
|
bulkSelection: r.opts.bulkSelection
|
|
6452
6585
|
}),
|
|
6453
|
-
r?.kind === "confirm" && /* @__PURE__ */ v(
|
|
6586
|
+
r?.kind === "confirm" && /* @__PURE__ */ v(wc, {
|
|
6454
6587
|
state: r,
|
|
6455
6588
|
onClose: () => i(null),
|
|
6456
6589
|
onExecute: async (e) => {
|
|
6457
6590
|
let t = r.id, n = r, a = n.opts.action, o = n.opts.longRunning ?? a?.long_running ?? !1, c = !1;
|
|
6458
6591
|
s((e) => e + 1);
|
|
6459
6592
|
try {
|
|
6460
|
-
let t = await n.opts.execute(e), r =
|
|
6593
|
+
let t = await n.opts.execute(e), r = mc(t);
|
|
6461
6594
|
if (p(n.title, o, a, r, t), r.kind === "success" || r.kind === "accepted") {
|
|
6462
6595
|
n.opts.onSuccess?.(t);
|
|
6463
|
-
let e =
|
|
6464
|
-
e && l(e),
|
|
6596
|
+
let e = hc(t);
|
|
6597
|
+
e && l(e), _c(t);
|
|
6465
6598
|
}
|
|
6466
6599
|
c = r.kind === "partial";
|
|
6467
6600
|
} catch (e) {
|
|
6468
|
-
p(n.title, o, a,
|
|
6601
|
+
p(n.title, o, a, vc(e));
|
|
6469
6602
|
} finally {
|
|
6470
6603
|
s((e) => Math.max(0, e - 1)), c || i((e) => e?.id === t ? null : e);
|
|
6471
6604
|
}
|
|
@@ -6474,12 +6607,12 @@ function mc({ children: e }) {
|
|
|
6474
6607
|
]
|
|
6475
6608
|
});
|
|
6476
6609
|
}
|
|
6477
|
-
function
|
|
6610
|
+
function Cc(e) {
|
|
6478
6611
|
if (!e || typeof e != "object") return;
|
|
6479
6612
|
let t = e, n = t.job_id ?? t.id;
|
|
6480
6613
|
return typeof n == "string" ? n : void 0;
|
|
6481
6614
|
}
|
|
6482
|
-
function
|
|
6615
|
+
function wc({ state: t, onClose: n, onExecute: r }) {
|
|
6483
6616
|
let { title: i, opts: a } = t, [o, s] = f(!1), c = a.action, l = a.destructive ?? c?.destructive ?? !1;
|
|
6484
6617
|
return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("div", {
|
|
6485
6618
|
onClick: n,
|
|
@@ -6569,7 +6702,7 @@ function gc({ state: t, onClose: n, onExecute: r }) {
|
|
|
6569
6702
|
onClick: async () => {
|
|
6570
6703
|
s(!0);
|
|
6571
6704
|
try {
|
|
6572
|
-
await r(
|
|
6705
|
+
await r(xc(a));
|
|
6573
6706
|
} finally {
|
|
6574
6707
|
s(!1);
|
|
6575
6708
|
}
|
|
@@ -6581,4 +6714,4 @@ function gc({ state: t, onClose: n, onExecute: r }) {
|
|
|
6581
6714
|
})] });
|
|
6582
6715
|
}
|
|
6583
6716
|
//#endregion
|
|
6584
|
-
export {
|
|
6717
|
+
export { yr as $, Le as $t, Gi as A, N as An, W as At, li as B, oe as Bn, xt as Bt, Fa as C, Me as Cn, In as Ct, ga as D, P as Dn, On as Dt, xa as E, Ne as En, Dn as Et, Ei as F, se as Fn, fn as Ft, Kr as G, T as Gn, ht as Gt, qr as H, O as Hn, bt as Ht, vi as I, he as In, Mt as It, zr as J, dt as Jt, Wr as K, gt as Kt, hi as L, ue as Ln, Ft as Lt, Wi as M, ye as Mn, q as Mt, Ui as N, ve as Nn, dn as Nt, Ji as O, je as On, Pn as Ot, Oi as P, _e as Pn, pn as Pt, kr as Q, ot as Qt, mi as R, ge as Rn, Et as Rt, Ta as S, be as Sn, Fn as St, Sa as T, Fe as Tn, An as Tt, Yr as U, D as Un, wt as Ut, Z as V, k as Vn, yt as Vt, Jr as W, E as Wn, mt as Wt, Lr as X, at as Xt, Br as Y, z as Yt, Rr as Z, it as Zt, Va as _, Ve as _n, zn as _t, Xs as a, qe as an, Kn as at, Pa as b, Ie as bn, kn as bt, Ks as c, R as cn, Hn as ct, Ws as d, Qe as dn, qn as dt, et as en, wr as et, js as f, Xe as fn, $n as ft, za as g, L as gn, J as gt, ws as h, $e as hn, Wn as ht, dc as i, Ke as in, Gn as it, Hi as j, Pe as jn, K as jt, Ki as k, Se as kn, jn as kt, Gs as l, I as ln, Vn as lt, Es as m, Ge as mn, nr as mt, bc as n, nt as nn, Zn as nt, Zs as o, He as on, ir as ot, ks as p, Ye as pn, rr as pt, Vr as q, ft as qt, fc as r, We as rn, Un as rt, nc as s, Re as sn, Jn as st, Sc as t, tt as tn, Yn as tt, zs as u, Je as un, ar as ut, Ba as v, Ze as vn, Rn as vt, _a as w, Ae as wn, Nn as wt, La as x, Ee as xn, Ln as xt, Q as y, F as yn, En as yt, fi as z, M as zn, Tt as zt };
|